diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 9ed04dedc..dd107e7da 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -282,13 +282,17 @@ jobs: if: github.event_name == 'push' && contains(github.ref, 'refs/tags') needs: build-library 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 public PyPI repository" uses: ansys/actions/release-pypi-public@v6 with: library-name: ${{ env.LIBRARY_NAME }} - twine-username: "__token__" - twine-token: ${{ secrets.PYPI_TOKEN }} + use-trusted-publisher: true - name: "Release to GitHub" uses: ansys/actions/release-github@v6