Skip to content

Commit e768b0f

Browse files
authored
Update deploy for OIDC credentials (#136)
* Update deploy for OIDC credentials * remove tokens
1 parent 354ec73 commit e768b0f

File tree

1 file changed

+26
-7
lines changed

1 file changed

+26
-7
lines changed

.github/workflows/deploy.yaml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,47 @@ on:
99
- published
1010

1111
jobs:
12-
pypi_push:
13-
environment: deploy
14-
if: "github.repository == 'MDAnalysis/GridDataFormats'"
15-
name: Build, upload and test pure Python wheels
12+
testpypi_push:
13+
environment:
14+
name: deploy
15+
url: https://test.pypi.org/p/GridDataFormats
16+
permissions:
17+
id-token: write
18+
if: |
19+
github.repository == 'MDAnalysis/GridDataFormats' &&
20+
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
21+
name: Build, upload and test pure Python wheels to TestPypi
1622
runs-on: ubuntu-latest
1723

1824
steps:
19-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v4
2026

2127
- name: testpypi_deploy
2228
uses: MDAnalysis/pypi-deployment@main
2329
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
2430
with:
25-
token: ${{ secrets.TEST_PYPI_API_TOKEN }}
2631
test_submission: true
2732
package_name: GridDataFormats
2833
module_name: 'gridData'
2934

35+
pypi_push:
36+
environment:
37+
name: deploy
38+
url: https://pypi.org/p/GridDataFormats
39+
permissions:
40+
id-token: write
41+
if: |
42+
github.repository == 'MDAnalysis/GridDataFormats' &&
43+
(github.event_name == 'release' && github.event.action == 'published')
44+
name: Build, upload and test pure Python wheels to PyPi
45+
runs-on: ubuntu-latest
46+
47+
steps:
48+
- uses: actions/checkout@v4
49+
3050
- name: pypi_deploy
3151
uses: MDAnalysis/pypi-deployment@main
3252
if: github.event_name == 'release' && github.event.action == 'published'
3353
with:
34-
token: ${{ secrets.PYPI_API_TOKEN }}
3554
package_name: GridDataFormats
3655
module_name: 'gridData'

0 commit comments

Comments
 (0)