diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f1aa2e0..6d51b15 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,17 +2,32 @@ name: Release on: release: types: [published] + workflow_dispatch: +permissions: + id-token: write jobs: - PyPi: + release-build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - uses: actions/setup-python@v6 with: python-version: "3.x" - - run: python -m pip install --upgrade pip build wheel twine + - run: python -m pip install --upgrade pip build wheel - run: python -m build --sdist --wheel - - run: python -m twine upload dist/* - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} + - uses: actions/upload-artifact@v5 + with: + name: release-dists + path: dist/ + pypi-publish: + runs-on: ubuntu-latest + needs: + - release-build + permissions: + id-token: write + steps: + - uses: actions/download-artifact@v6 + with: + name: release-dists + path: dist/ + - uses: pypa/gh-action-pypi-publish@release/v1