Skip to content

Commit 499666f

Browse files
committed
Use trusted publishing
1 parent 985f051 commit 499666f

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

.github/workflows/python-publish.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,19 @@ on:
88
jobs:
99
deploy:
1010
runs-on: ubuntu-latest
11-
11+
permissions:
12+
id-token: write
1213
steps:
13-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
1415
- name: Set up Python
15-
uses: actions/setup-python@v5
16+
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
1617
with:
1718
python-version: "3.x"
1819
- name: Install dependencies
1920
run: |
2021
python -m pip install --upgrade pip
21-
pip install setuptools wheel twine build
22-
- name: Build and publish
23-
env:
24-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
25-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
26-
run: |
27-
python -m build
28-
twine upload dist/*
22+
pip install setuptools wheel build
23+
- name: Build
24+
run: "python -m build"
25+
- name: Publish
26+
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.9.0

0 commit comments

Comments
 (0)