diff --git a/.github/workflows/release_workflow.yml b/.github/workflows/release_workflow.yml new file mode 100644 index 0000000..7bdb76f --- /dev/null +++ b/.github/workflows/release_workflow.yml @@ -0,0 +1,38 @@ +# Publish release to PyPi + +name: Publish Release + +on: + # Trigger on release, to publish release packages to PyPI + release: + types: [published] + + # Run the workflow manually + # This might be useful if the automated publish fails for some reason (use with CARE!!) + workflow_dispatch: + +jobs: + pypi-publish: + name: Upload release to PyPI + runs-on: ubuntu-latest + + environment: release + + permissions: + id-token: write + + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-python@v4 + with: + python-version: "3.x" + + - name: deps + run: python -m pip install -U hatch + + - name: build + run: hatch build + + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1