Skip to content

Commit

Permalink
Merge pull request #3 from European-XFEL/gha-publish
Browse files Browse the repository at this point in the history
Publish to PyPI from Github actions on tags
  • Loading branch information
takluyver authored Dec 6, 2024
2 parents 8ecfd7b + 8706b6e commit c49d06f
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,27 @@ jobs:
run: |
python3 -m pip install pytest
python3 -m pytest -v
publish:
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') }}
needs: test_pyenv
permissions:
id-token: write # OIDC for uploading to PyPI

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Build packages
run: |
python3 -m pip install flit
flit build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit c49d06f

Please sign in to comment.