Skip to content

Commit

Permalink
Merge pull request #17 from MDAnalysis/deploy-oidc
Browse files Browse the repository at this point in the history
Update deploy.yaml for OIDC
  • Loading branch information
IAlibay authored Nov 3, 2023
2 parents db4835c + bd624c9 commit 83bebc9
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 13 deletions.
38 changes: 28 additions & 10 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,47 @@ 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 }}
tests: true
test_deps: 'pytest MDAnalysisTests'
package_name: 'waterdynamics'
tests: false
8 changes: 5 additions & 3 deletions .github/workflows/gh-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:

- id: get-compatible-python
uses: MDAnalysis/mdanalysis-compatible-python@main
with:
release: "latest"

main-tests:
if: "github.repository == 'MDAnalysis/waterdynamics'"
Expand All @@ -48,7 +50,7 @@ jobs:
mdanalysis-version: ["latest", "develop"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Build information
run: |
Expand Down Expand Up @@ -118,7 +120,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
Expand All @@ -144,7 +146,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ needs.environment-config.outputs.stable-python-version }}
uses: actions/setup-python@v4
Expand Down

0 comments on commit 83bebc9

Please sign in to comment.