Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deploy.yaml for OIDC #72

Merged
merged 1 commit into from
Oct 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 29 additions & 8 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,16 @@ on:
- published

jobs:
pypi_push:
environment: deploy
if: "github.repository == 'MDAnalysis/mdanalysis-sphinx-theme'"
name: Build, upload, and test pure Python wheels
testpypi_push:
environment:
name: deploy
url: https://test.pypi.org/p/mdanalysis-sphinx-theme
permissions:
id-token: write
if: |
"github.repository == 'MDAnalysis/mdanalysis-sphinx-theme'" &&
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))
name: Build, upload, and test pure Python wheels to TestPyPi
runs-on: ubuntu-latest

steps:
Expand All @@ -22,18 +28,33 @@ jobs:

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

pypi_push:
environment:
name: deploy
url: https://pypi.org/p/mdanalysis-sphinx-theme
permissions:
id-token: write
if: |
"github.repository == 'MDAnalysis/mdanalysis-sphinx-theme'" &&
(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
with:
submodules: 'true'

- name: pypi_deploy
uses: MDAnalysis/pypi-deployment@main
if: github.event_name == 'release' && github.event.action == 'published'
with:
token: ${{ secrets.PYPI_UPLOAD_TOKEN }}
tests: false
package_name: 'mdanalysis_sphinx_theme'
module_name: 'mdanalysis_sphinx_theme'