Skip to content

Commit 778bc8a

Browse files
committed
first commit: PyPI release workflow
1 parent 4680b1f commit 778bc8a

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/release.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Release
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Test On All Platforms"]
6+
types:
7+
- completed
8+
workflow_dispatch:
9+
10+
permissions:
11+
id-token: write
12+
contents: read
13+
14+
jobs:
15+
publish:
16+
name: Build and Publish
17+
if: |
18+
github.event.workflow_run.conclusion == 'success' &&
19+
startsWith(github.event.workflow_run.head_branch, 'refs/tags/v') &&
20+
!endsWith(github.event.workflow_run.head_branch, '-test')
21+
runs-on: ubuntu-latest
22+
environment:
23+
name: pypi
24+
url: https://pypi.org/project/busylight-for-humans
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- name: Install uv and set Python version.
30+
uses: astral-sh/setup-uv@v5
31+
with:
32+
version: "0.7.5"
33+
python-version: 3.9
34+
35+
- name: Build package.
36+
run: |
37+
uv build
38+
39+
- name: Publish to PyPI
40+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)