From 1a26331c64311cd818932a0f7998165dd4278827 Mon Sep 17 00:00:00 2001 From: Oliver Beckstein Date: Wed, 18 Sep 2024 16:35:21 -0700 Subject: [PATCH] use MDAnalysis deploy & test action for deployment --- .github/workflows/deploy.yaml | 53 +++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/deploy.yaml diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..4b6f833 --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,53 @@ +name: Build and upload to PyPi + +on: + push: + tags: + - "*" + release: + types: + - published + +jobs: + test_pypi_push: + environment: + name: deploy + url: https://test.pypi.org/p/numkit + permissions: + id-token: write + if: | + github.repository == 'Becksteinlab/numkit' && + (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + name: Build, upload and test pure Python wheels to TestPypi + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: testpypi_deploy + uses: MDAnalysis/pypi-deployment@main + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + with: + test_submission: true + package_name: 'numkit' + + pypi_push: + environment: + name: deploy + url: https://pypi.org/p/numkit + permissions: + id-token: write + if: | + github.repository == 'MDAnalysis/mda-xdrlib' && + (github.event_name == 'release' && github.event.action == 'published') + name: Build, upload and test pure Python wheels to PyPi + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: pypi_deploy + uses: MDAnalysis/pypi-deployment@main + if: github.event_name == 'release' && github.event.action == 'published' + with: + package_name: 'numkit'