Skip to content

Commit

Permalink
Merge pull request #238 from European-XFEL/auto-release
Browse files Browse the repository at this point in the history
Create a workflow for automatically publishing new releases
  • Loading branch information
JamesWrigley authored Apr 23, 2024
2 parents 8658a02 + 5fe53c8 commit a9df3af
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Tests
on:
push:
branches: [master]
tags: ["*"]
pull_request:

env:
Expand Down Expand Up @@ -42,3 +43,27 @@ jobs:
- name: Test with pytest
run: |
python3 -m pytest -v
publish:
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') }}
needs: tests
permissions:
id-token: write

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 build
python3 -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit a9df3af

Please sign in to comment.