Skip to content

Commit 7780fe5

Browse files
authored
Use trusted publishing on version tag push (#106)
1 parent 48b8a18 commit 7780fe5

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

.github/workflows/publish.yml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
11
name: Publish
22
on:
3-
release:
4-
types: [published]
5-
3+
push:
4+
tags:
5+
- 'v[0-9]+.[0-9]+.[0-9]+'
66
jobs:
77
publish:
88
runs-on: ubuntu-latest
9-
9+
environment:
10+
name: pypi
11+
url: https://pypi.org/p/${{ github.event.repository.name }}
12+
permissions:
13+
id-token: write
1014
steps:
1115
- uses: actions/checkout@v4
12-
13-
- name: Set up Python 3.13
14-
uses: actions/setup-python@v5
16+
- uses: actions/setup-python@v5
1517
with:
1618
python-version: 3.13
17-
18-
- name: Build
19-
run: |
20-
pip install --upgrade build twine
19+
- run: |
20+
python -m pip install --upgrade build
2121
python -m build
22-
2322
- name: Publish to PyPI
24-
uses: pypa/[email protected]
25-
with:
26-
password: ${{ secrets.PYPI_TOKEN }}
23+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)