From fe56500f36fc58747b5818a91f9119b77df6e57b Mon Sep 17 00:00:00 2001 From: Andy Grigg Date: Wed, 21 Aug 2024 08:55:13 -0400 Subject: [PATCH 1/3] Update CI --- .github/workflows/ci_cd.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index dcdceac9..3a420271 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -154,13 +154,15 @@ jobs: if: github.event_name == 'push' && contains(github.ref, 'refs/tags') needs: [build-library, update-changelog] runs-on: ubuntu-latest + permissions: + id-token: write + contents: write steps: - uses: ansys/actions/release-pypi-public@v7 name: "Release to public PyPI" with: library-name: ${{ env.LIBRARY_NAME }} - twine-username: "__token__" - twine-token: ${{ secrets.PYPI_TOKEN }} + use-trusted-publisher: true - uses: ansys/actions/release-github@v7 name: "Release to GitHub" From ae127118fc2fb207ec44707a8c3318541db55bbd Mon Sep 17 00:00:00 2001 From: Andy Grigg Date: Wed, 21 Aug 2024 08:59:17 -0400 Subject: [PATCH 2/3] Add environment --- .github/workflows/ci_cd.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 3a420271..551639d1 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -154,6 +154,7 @@ jobs: if: github.event_name == 'push' && contains(github.ref, 'refs/tags') needs: [build-library, update-changelog] runs-on: ubuntu-latest + environment: release permissions: id-token: write contents: write From b34fec05f49523da888c2d96ca14c7ce442b0e56 Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Wed, 21 Aug 2024 13:01:41 +0000 Subject: [PATCH 3/3] chore: adding changelog file 646.maintenance.md --- doc/changelog.d/646.maintenance.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changelog.d/646.maintenance.md diff --git a/doc/changelog.d/646.maintenance.md b/doc/changelog.d/646.maintenance.md new file mode 100644 index 00000000..b4012345 --- /dev/null +++ b/doc/changelog.d/646.maintenance.md @@ -0,0 +1 @@ +Use PyPI Trusted Publisher approach for releases \ No newline at end of file