diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ea81357..ff061ef 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,6 +10,11 @@ jobs: release: name: Release runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/django-json-agg + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing steps: - name: Check out the repository uses: actions/checkout@v3 @@ -58,17 +63,12 @@ jobs: - name: Publish package on PyPI if: steps.check-version.outputs.tag uses: pypa/gh-action-pypi-publish@v1.9.0 - with: - user: __token__ - password: ${{ secrets.PYPI_TOKEN }} - name: Publish package on TestPyPI if: "! steps.check-version.outputs.tag" uses: pypa/gh-action-pypi-publish@v1.9.0 with: - user: __token__ - password: ${{ secrets.TEST_PYPI_TOKEN }} - repository_url: https://test.pypi.org/legacy/ + repository-url: https://test.pypi.org/legacy/ - name: Publish the release notes uses: release-drafter/release-drafter@v6.0.0