Skip to content

Commit 432e532

Browse files
committed
Automate publishing on release creation.
1 parent ccf1389 commit 432e532

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
id-token: write
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-python@v5
16+
with:
17+
python-version: "3.x"
18+
- name: Install build dependencies
19+
run: pip install build
20+
- name: Build sdist and wheel
21+
run: python -m build
22+
- uses: actions/upload-artifact@v4
23+
with:
24+
name: dist
25+
path: dist/
26+
27+
publish:
28+
needs: build
29+
runs-on: ubuntu-latest
30+
environment:
31+
name: pypi
32+
url: https://pypi.org/p/syncsketch
33+
permissions:
34+
id-token: write
35+
steps:
36+
- uses: actions/download-artifact@v4
37+
with:
38+
name: dist
39+
path: dist/
40+
- uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)