From 8fb6b05e3175fd1308a1d9fc1830e226a4d766dd Mon Sep 17 00:00:00 2001 From: Helio Machado <0x2b3bfa0+git@googlemail.com> Date: Mon, 11 Sep 2023 18:24:41 +0200 Subject: [PATCH] Migrate from PyPI tokens to Trusted Publishers (#106) * Migrate from PyPI tokens to Trusted Publishers * Update release.yml * Update release.yml --- {{cookiecutter.project_name}}/.github/workflows/release.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_name}}/.github/workflows/release.yml b/{{cookiecutter.project_name}}/.github/workflows/release.yml index f12f1af..199e7fe 100644 --- a/{{cookiecutter.project_name}}/.github/workflows/release.yml +++ b/{{cookiecutter.project_name}}/.github/workflows/release.yml @@ -10,6 +10,10 @@ env: jobs: release: + environment: pypi + permissions: + contents: read + id-token: write runs-on: ubuntu-latest steps: - name: Check out the repository @@ -34,5 +38,3 @@ jobs: - name: Upload package if: github.event_name == 'release' uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{"{{"}} secrets.PYPI_TOKEN {{"}}"}}