Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 27 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,36 @@
name: PyPi Release
name: Release

on:
release:
types: [published]
workflow_dispatch:

jobs:
PyPi:
pypi-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
- run: python -m build --sdist --wheel
- uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/

pypi-publish:
runs-on: ubuntu-latest
needs:
- pypi-build
permissions:
id-token: write

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 build --sdist --wheel
- run: python -m twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
- uses: actions/download-artifact@v5
with:
name: release-dists
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1