Skip to content

Commit 0736760

Browse files
authored
Merge pull request #67 from fonttools/trusted-publishing
Use trusted publishing
2 parents 1448a60 + c984207 commit 0736760

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ jobs:
8181
# ... and all build jobs completed successfully
8282
needs: [build_wheels, build_aarch64_wheels]
8383
runs-on: ubuntu-latest
84+
environment:
85+
name: publish-to-pypi
86+
url: https://pypi.org/p/unicodedata2
87+
permissions:
88+
id-token: write # IMPORTANT: mandatory for trusted publishing
89+
contents: write # Needed to create GH release
8490
steps:
8591
- uses: actions/checkout@v4
8692
with:
@@ -127,11 +133,8 @@ jobs:
127133
body_path: "${{ runner.temp }}/release_notes.md"
128134
draft: false
129135
prerelease: false
130-
- name: Build and publish
131-
env:
132-
TWINE_USERNAME: __token__
133-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
134-
run: |
135-
python setup.py sdist
136-
twine upload dist/*
136+
- name: Build sdist
137+
run: python setup.py sdist
138+
- name: Publish package distributions to PyPI
139+
uses: pypa/gh-action-pypi-publish@release/v1
137140

0 commit comments

Comments
 (0)