Skip to content

Commit 950f2be

Browse files
committed
Switch release to OpenID Connect
1 parent 1925d25 commit 950f2be

File tree

1 file changed

+27
-12
lines changed

1 file changed

+27
-12
lines changed

.github/workflows/release.yml

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,36 @@
1-
name: PyPi Release
1+
name: Release
22

33
on:
44
release:
55
types: [published]
6+
workflow_dispatch:
67

78
jobs:
8-
PyPi:
9+
pypi-build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v5
14+
- uses: actions/setup-python@v6
15+
with:
16+
python-version: "3.x"
17+
- run: python -m pip install --upgrade pip build wheel
18+
- run: python -m build --sdist --wheel
19+
- uses: actions/upload-artifact@v4
20+
with:
21+
name: release-dists
22+
path: dist/
923

24+
pypi-publish:
1025
runs-on: ubuntu-latest
26+
needs:
27+
- pypi-build
28+
permissions:
29+
id-token: write
30+
1131
steps:
12-
- uses: actions/checkout@v5
13-
- uses: actions/setup-python@v6
14-
with:
15-
python-version: "3.x"
16-
- run: python -m pip install --upgrade pip build wheel twine
17-
- run: python -m build --sdist --wheel
18-
- run: python -m twine upload dist/*
19-
env:
20-
TWINE_USERNAME: __token__
21-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
32+
- uses: actions/download-artifact@v5
33+
with:
34+
name: release-dists
35+
path: dist/
36+
- uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)