From 92f1a879f8e6b2c4464d791fa2543e1681619998 Mon Sep 17 00:00:00 2001 From: Dhanunjaya-Elluri Date: Mon, 23 Dec 2024 12:17:35 +0100 Subject: [PATCH 1/2] enh: improve publish ci to use env vars --- .github/workflows/publish_to_pypi.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish_to_pypi.yml b/.github/workflows/publish_to_pypi.yml index 64d759413..77f188011 100644 --- a/.github/workflows/publish_to_pypi.yml +++ b/.github/workflows/publish_to_pypi.yml @@ -86,8 +86,8 @@ jobs: GITHUB_TOKEN: ${{ github.token }} run: >- gh release create - '${{ github.ref_name }}' - --repo '${{ github.repository }}' + "$GITHUB_REF_NAME" + --repo "$GITHUB_REPOSITORY" --notes "" - name: Upload artifact signatures to GitHub Release env: @@ -97,5 +97,5 @@ jobs: # sigstore-produced signatures and certificates. run: >- gh release upload - '${{ github.ref_name }}' dist/** - --repo '${{ github.repository }}' + "$GITHUB_REF_NAME" dist/** + --repo "$GITHUB_REPOSITORY" From 3be4573c1520c571bd4a30e52d4bf0256b08618b Mon Sep 17 00:00:00 2001 From: Dhanunjaya-Elluri Date: Mon, 23 Dec 2024 16:06:16 +0100 Subject: [PATCH 2/2] add `persist-credentials` to publish ci --- .github/workflows/publish_to_pypi.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish_to_pypi.yml b/.github/workflows/publish_to_pypi.yml index 77f188011..01259e211 100644 --- a/.github/workflows/publish_to_pypi.yml +++ b/.github/workflows/publish_to_pypi.yml @@ -19,6 +19,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + persist-credentials: false - name: Set up Python uses: actions/setup-python@v5 with: