Skip to content

Commit

Permalink
CI: Use Trusted Publisher to release package (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
SMoraisAnsys authored Jun 6, 2024
1 parent 5a32e32 commit d9b3d1d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d9b3d1d

Please sign in to comment.