Skip to content

Commit 4082209

Browse files
committed
Use trusted publishing
1 parent 3747ab3 commit 4082209

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,15 @@ jobs:
6060
needs:
6161
- lint
6262
- test
63-
# This is required to create a release using Github integration token
64-
# https://github.com/softprops/action-gh-release?tab=readme-ov-file#permissions
63+
environment:
64+
name: publish-to-pypi
65+
url: https://pypi.org/p/fontmake
6566
permissions:
67+
# This is required to create a release using Github integration token
68+
# https://github.com/softprops/action-gh-release?tab=readme-ov-file#permissions
6669
contents: write
70+
# IMPORTANT: mandatory for trusted publishing:
71+
id-token: write
6772
runs-on: ubuntu-latest
6873
steps:
6974
- uses: actions/checkout@v4
@@ -101,9 +106,6 @@ jobs:
101106
echo "IS_PRERELEASE=false" >> "$GITHUB_ENV"
102107
fi
103108
- name: Build and publish
104-
env:
105-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
106-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
107109
run: |
108110
if [ "$IS_PRERELEASE" == true ]; then
109111
echo "DEBUG: This is a pre-release"

0 commit comments

Comments
 (0)