diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e429b98..0467256 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,6 +13,12 @@ jobs: release-on-pypi: name: Publish on PyPI runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/context-dev-haystack + permissions: + contents: read + id-token: write steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -32,7 +38,4 @@ jobs: run: hatch build - name: Publish to PyPI - env: - HATCH_INDEX_USER: __token__ - HATCH_INDEX_AUTH: ${{ secrets.PYPI_API_TOKEN }} - run: hatch publish -y + uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6fac404..46256ad 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,4 +35,4 @@ Keep changes focused, add tests for behavior changes, and use Conventional Commi ## Releases -Maintainers publish releases by pushing a semantic version tag such as `v0.1.0`. The release workflow builds the source distribution and wheel, then publishes both to PyPI. +Maintainers publish releases by pushing a semantic version tag such as `v0.1.0`. The release workflow builds the source distribution and wheel, then publishes both to PyPI through Trusted Publishing.