Skip to content

Commit

Permalink
Update deploy.yaml for OIDC
Browse files Browse the repository at this point in the history
  • Loading branch information
IAlibay committed Oct 29, 2023
1 parent db4835c commit 0678a07
Showing 1 changed file with 27 additions and 10 deletions.
37 changes: 27 additions & 10 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,46 @@ on:
- published

jobs:
pypi_push:
environment: deploy
if: "github.repository == 'MDAnalysis/waterdynamics'"
name: Build, upload and test pure Python wheels
testpypi_push:
environment:
name: deploy
url: https://test.pypi.org/p/waterdynamics
permissions:
id-token: write
if: |
github.repository == 'MDAnalysis/waterdynamics' &&
(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@v3
- uses: actions/checkout@v4

- name: testpypi_deploy
uses: MDAnalysis/pypi-deployment@main
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
with:
token: ${{ secrets.TEST_PYPI_API_TOKEN }}
test_submission: true
tests: true
test_deps: 'pytest MDAnalysisTests'
package_name: 'waterdynamics'

pypi_push:
environment:
name: deploy
url: https://pypi.org/p/waterdynamics
permissions:
id-token: write
if: |
github.repository == 'MDAnalysis/waterdynamics' &&
(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:
token: ${{ secrets.PYPI_API_TOKEN }}
package_name: 'waterdynamics'
tests: false
test_deps: 'pytest MDAnalysisTests'

0 comments on commit 0678a07

Please sign in to comment.