mirror of https://github.com/astral-sh/ruff
Improve token handling (#4653)
* Use release environment * Use pypi trusted publishing * typo
This commit is contained in:
parent
33a7ed058f
commit
12e45498e8
|
|
@ -394,18 +394,22 @@ jobs:
|
||||||
- musllinux
|
- musllinux
|
||||||
- musllinux-cross
|
- musllinux-cross
|
||||||
if: "startsWith(github.ref, 'refs/tags/')"
|
if: "startsWith(github.ref, 'refs/tags/')"
|
||||||
|
environment:
|
||||||
|
name: release
|
||||||
|
permissions:
|
||||||
|
# For pypi trusted publishing
|
||||||
|
id-token: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: wheels
|
name: wheels
|
||||||
- uses: actions/setup-python@v4
|
path: wheels
|
||||||
- name: "Publish to PyPi"
|
- name: "Publish to PyPi"
|
||||||
env:
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
TWINE_USERNAME: __token__
|
with:
|
||||||
TWINE_PASSWORD: ${{ secrets.RUFF_TOKEN }}
|
skip-existing: true
|
||||||
run: |
|
packages-dir: wheels
|
||||||
pip install --upgrade twine
|
verbose: true
|
||||||
twine upload --skip-existing *
|
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: binaries
|
name: binaries
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue