Skip to content

Commit 4a17f80

Browse files
committed
Add Trusted Publishing workflow for PyPI package
"Stolen" from sopel-irc/sopel-twitter (but not *really* stolen, since I wrote that file).
1 parent 2e6b2a1 commit 4a17f80

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
upload:
12+
runs-on: ubuntu-latest
13+
environment: release
14+
permissions:
15+
id-token: write
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.10'
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install build
26+
- name: Build package
27+
run: python -m build
28+
- name: Publish package
29+
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450

0 commit comments

Comments
 (0)