Skip to content

Commit 1ece2cb

Browse files
committed
Using PyPI trusted publisher
1 parent 9fe9702 commit 1ece2cb

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

.github/workflows/deploy-wheels.yaml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ jobs:
7878
name: Upload to PyPI test
7979
needs: [build_wheels_win_32, build_wheels_win_64]
8080
runs-on: ubuntu-latest
81+
environment:
82+
name: pypi
83+
url: https://test.pypi.org/project/delphivcl
84+
permissions:
85+
id-token: write
8186
# upload to PyPI test only for pushes to 'deploy-pypi-test'
8287
if: github.event_name == 'push' && github.ref == 'refs/heads/deploy-pypi-test'
8388
steps:
@@ -87,16 +92,19 @@ jobs:
8792
path: dist
8893

8994
- name: Publish package to TestPyPI
90-
uses: pypa/gh-action-pypi-publish@master
95+
uses: pypa/gh-action-pypi-publish@release/v1
9196
with:
92-
user: ${{ secrets.test_pypi_username }}
93-
password: ${{ secrets.test_pypi_password }}
94-
repository_url: https://test.pypi.org/legacy/
97+
repository_url: https://test.pypi.org/legacy/
9598

9699
upload_pypi:
97100
name: Upload to PyPI
98101
needs: [build_wheels_win_32, build_wheels_win_64]
99102
runs-on: ubuntu-latest
103+
environment:
104+
name: pypi
105+
url: https://pypi.org/project/delphivcl/
106+
permissions:
107+
id-token: write
100108
# upload to PyPI only for pushes to 'deploy-pypi'
101109
if: github.event_name == 'push' && github.ref == 'refs/heads/deploy-pypi'
102110
steps:
@@ -106,7 +114,4 @@ jobs:
106114
path: dist
107115

108116
- name: Publish package to PyPI
109-
uses: pypa/gh-action-pypi-publish@master
110-
with:
111-
user: ${{ secrets.pypi_username }}
112-
password: ${{ secrets.pypi_password }}
117+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)