Skip to content

Commit 3cf1d6d

Browse files
authored
Update python-publish.yml
1 parent 7b794fa commit 3cf1d6d

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.github/workflows/python-publish.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,16 @@ name: Upload Python Package
55

66
on:
77
release:
8-
types: [published]
8+
types: [published, workflow_dispatch]
99

1010
jobs:
1111
deploy:
1212
runs-on: ubuntu-latest
13+
environment:
14+
name: pypi
15+
url: https://pypi.org/p/mpi4jax
16+
permissions:
17+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
1318

1419
steps:
1520
- uses: actions/checkout@v2
@@ -30,11 +35,10 @@ jobs:
3035
run: |
3136
python -m pip install --upgrade pip
3237
pip install setuptools wheel twine mpi4py cython
33-
34-
- name: Build and publish
35-
env:
36-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
37-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
38+
39+
- name: Build package
3840
run: |
3941
python setup.py sdist
40-
twine upload dist/*
42+
43+
- name: Publish package distributions to PyPI
44+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)