Skip to content

Commit 510ef45

Browse files
authored
Add release workflow (#12)
1 parent 9c6c543 commit 510ef45

2 files changed

Lines changed: 40 additions & 2 deletions

File tree

.github/release-drafter.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
name-template: "v$RESOLVED_VERSION"
3-
tag-template: "v$RESOLVED_VERSION"
2+
name-template: "$RESOLVED_VERSION"
3+
tag-template: "$RESOLVED_VERSION"
44
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
55
sort-direction: ascending
66

.github/workflows/release.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Release
3+
4+
# yamllint disable-line rule:truthy
5+
on:
6+
release:
7+
types:
8+
- published
9+
10+
jobs:
11+
release:
12+
name: Releasing to PyPi
13+
runs-on: ubuntu-latest
14+
environment:
15+
name: release
16+
url: https://pypi.org/project/go2rtc-client/
17+
permissions:
18+
contents: write
19+
id-token: write
20+
steps:
21+
- name: ⤵️ Check out code from GitHub
22+
uses: actions/checkout@v4.2.2
23+
- name: 🏗 Set up uv
24+
uses: astral-sh/setup-uv@v3
25+
with:
26+
enable-cache: true
27+
- name: 🏗 Set package version
28+
run: |
29+
sed -i "s/^version = \".*\"/version = \"${{ github.event.release.tag_name }}\"/" pyproject.toml
30+
- name: 🏗 Build package
31+
run: uv build
32+
- name: 🚀 Publish to PyPi
33+
run: uv publish
34+
- name: ✍️ Sign published artifacts
35+
uses: sigstore/gh-action-sigstore-python@v3.0.0
36+
with:
37+
inputs: ./dist/*.tar.gz ./dist/*.whl
38+
release-signing-artifacts: true

0 commit comments

Comments
 (0)