Skip to content

Commit 6304658

Browse files
committed
Add PyPI publishing workflow
This workflow is identical to the one used by beman-tidy.
1 parent d9cb2a7 commit 6304658

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/publish.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2+
3+
name: Build and Publish
4+
5+
on:
6+
release:
7+
types:
8+
- published
9+
10+
jobs:
11+
build:
12+
name: Build Distributions
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v5
17+
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v6
20+
with:
21+
enable-cache: true
22+
23+
- name: uv build
24+
run: uv build
25+
26+
- name: Upload artifacts
27+
uses: actions/upload-artifact@v4
28+
with:
29+
name: dists
30+
path: dist/
31+
32+
publish:
33+
name: Publish to PyPI
34+
needs: build
35+
runs-on: ubuntu-latest
36+
environment: pypi
37+
permissions:
38+
id-token: write
39+
steps:
40+
- name: Fetch artifacts
41+
uses: actions/download-artifact@v4
42+
with:
43+
name: dists
44+
path: dist/
45+
46+
- name: Publish to PyPI
47+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)