diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..d9b0387 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,29 @@ +--- +name: Publish Python package to PyPI + +on: + release: + types: + - published + +jobs: + deploy: + runs-on: ubuntu-22.04 + environment: release + permissions: + id-token: write + steps: + - name: Checkout repo + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install 'build[virtualenv]' + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1