|
1 | | -name: PyPi Release |
| 1 | +name: Release |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | release: |
5 | 5 | types: [published] |
| 6 | + workflow_dispatch: |
6 | 7 |
|
7 | 8 | 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/ |
9 | 23 |
|
| 24 | + pypi-publish: |
10 | 25 | runs-on: ubuntu-latest |
| 26 | + needs: |
| 27 | + - pypi-build |
| 28 | + permissions: |
| 29 | + id-token: write |
| 30 | + |
11 | 31 | 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