From e974b09a514bc5140384523ab5bc86ba9e5c24d6 Mon Sep 17 00:00:00 2001 From: Steven Maude Date: Mon, 12 Jan 2026 11:58:27 +0000 Subject: [PATCH] Add a publish step to build workflow This adds a publication step using PyPI Trusted Publishers. --- .github/workflows/ci-build.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 82c5fac..0e929fd 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -53,3 +53,28 @@ jobs: with: name: python-package-distributions path: dist/ + + publish: + name: Publish to PyPI + needs: build + runs-on: ubuntu-latest + + if: startsWith(github.ref, 'refs/tags/') + + permissions: + id-token: write + contents: read + + environment: + name: release + url: https://pypi.org/p/scraperwiki + + steps: + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: python-package-distributions + path: dist/ + + - name: Publish distribution to PyPI + uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0