Merge pull request #78 from jochym/dev #53
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build, test and publish to (test)PyPI | |
on: | |
push: | |
tags: | |
- 'v*' # matches semantic versioning (e.g., v1.2.3) | |
branches: | |
- master | |
- main | |
jobs: | |
build: | |
uses: ./.github/workflows/build.yml | |
publish-to-pypi: | |
name: Publish to PyPI | |
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/elastic | |
permissions: | |
id-token: write # IMPORTANT: mandatory for trusted publishing | |
steps: | |
- name: Download all the dists | |
uses: actions/download-artifact@main | |
with: | |
name: python-package-distributions | |
path: dist/ | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |