Skip to content

Commit

Permalink
ci(publish): generate single-use token for publishing
Browse files Browse the repository at this point in the history
Added a step in the publish.yml workflow to generate a mint token using the tschm/token-mint-action. Updated the poetry publish command to include the generated API token for authentication.
  • Loading branch information
matfax committed Jul 11, 2023
1 parent 3293d61 commit f21ea36
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 10,7 @@ jobs:
environment: publishing
permissions:
id-token: write
contents: read
strategy:
matrix:
python-version: [3.8]
Expand Down Expand Up @@ -53,5 54,8 @@ jobs:
file: ./coverage.xml
flags: unittests
name: python ${{ matrix.python-version }} on ${{ runner.os }}
- name: generate mint token
id: mint
uses: tschm/[email protected]
- name: publishing to PyPi
run: poetry publish -n -vv
run: poetry publish -n -vv -u __token__ -p '${{ steps.mint.outputs.api-token }}'

0 comments on commit f21ea36

Please sign in to comment.