Skip to content

Commit f21ea36

Browse files
committed
ci(publish): generate single-use token for publishing
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.
1 parent 3293d61 commit f21ea36

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/publish.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
environment: publishing
1111
permissions:
1212
id-token: write
13+
contents: read
1314
strategy:
1415
matrix:
1516
python-version: [3.8]
@@ -53,5 +54,8 @@ jobs:
5354
file: ./coverage.xml
5455
flags: unittests
5556
name: python ${{ matrix.python-version }} on ${{ runner.os }}
57+
- name: generate mint token
58+
id: mint
59+
uses: tschm/token-mint-action@v1.0.2
5660
- name: publishing to PyPi
57-
run: poetry publish -n -vv
61+
run: poetry publish -n -vv -u __token__ -p '${{ steps.mint.outputs.api-token }}'

0 commit comments

Comments
 (0)