From f620cf7746dafbc4c51e79f0ead0f66184180011 Mon Sep 17 00:00:00 2001 From: Revathyvenugopal162 Date: Thu, 30 May 2024 11:07:14 +0200 Subject: [PATCH 1/3] maint: update the release workflow to trusted publishers --- .github/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 250b84a2..c484587d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,6 +90,11 @@ jobs: if: github.event_name == 'push' && contains(github.ref, 'refs/tags') needs: [build-library, update-changelog] runs-on: ubuntu-latest + # Specifying a GitHub environment is optional, but strongly encouraged + environment: release + permissions: + id-token: write + contents: write steps: - name: Release to the private PyPI repository uses: ansys/actions/release-pypi-private@v6 @@ -101,8 +106,7 @@ jobs: # uses: ansys/actions/release-pypi-public@v6 # with: # library-name: ${{ env.PACKAGE_NAME }} - # twine-username: "__token__" - # twine-token: ${{ secrets.PYPI_TOKEN }} + # use-trusted-publisher: true - name: Release to GitHub uses: ansys/actions/release-github@v6 From 8f33c777164d0c83173a353508e3df348d78b98f Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot Date: Thu, 30 May 2024 09:09:22 +0000 Subject: [PATCH 2/3] Adding changelog entry: 71.changed.md --- doc/changelog.d/71.changed.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changelog.d/71.changed.md diff --git a/doc/changelog.d/71.changed.md b/doc/changelog.d/71.changed.md new file mode 100644 index 00000000..bab12286 --- /dev/null +++ b/doc/changelog.d/71.changed.md @@ -0,0 +1 @@ +ci: update the release workflow to trusted publishers \ No newline at end of file From 8e1633838451785f1563ae4e3a45f77ba0011dd6 Mon Sep 17 00:00:00 2001 From: Revathyvenugopal162 Date: Thu, 30 May 2024 15:39:14 +0200 Subject: [PATCH 3/3] fix: uncommet the release --- .github/workflows/ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c484587d..16257d7a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -102,11 +102,12 @@ jobs: library-name: ${{ env.PACKAGE_NAME }} twine-username: "__token__" twine-token: ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }} - # - name: Release to the public PyPI repository - # uses: ansys/actions/release-pypi-public@v6 - # with: - # library-name: ${{ env.PACKAGE_NAME }} - # use-trusted-publisher: true + + - name: Release to the public PyPI repository + uses: ansys/actions/release-pypi-public@v6 + with: + library-name: ${{ env.PACKAGE_NAME }} + use-trusted-publisher: true - name: Release to GitHub uses: ansys/actions/release-github@v6