Skip to content

Commit 7dfc513

Browse files
Merge pull request #103 from nexios-labs/dev
feat(ci): add GitHub Actions workflow for automated release on tag push
2 parents e00f65e + 7c945c3 commit 7dfc513

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/release.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Release on Tag
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
name: Build and Publish Release
11+
runs-on: ubuntu-latest
12+
13+
permissions:
14+
contents: write
15+
id-token: write
16+
17+
steps:
18+
- name: Checkout repo
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: '3.11'
25+
26+
- name: Install Poetry
27+
run: |
28+
curl -sSL https://install.python-poetry.org | python3 -
29+
echo "$HOME/.local/bin" >> $GITHUB_PATH
30+
31+
- name: Install dependencies
32+
run: poetry install --no-root
33+
34+
- name: Build the package
35+
run: poetry build
36+
37+
- name: Create GitHub Release with Notes
38+
uses: softprops/action-gh-release@v2
39+
with:
40+
tag_name: ${{ github.ref_name }}
41+
name: Release ${{ github.ref_name }}
42+
generate_release_notes: true
43+
files: dist/*
44+
45+
- name: Publish to PyPI via Trusted Publishing
46+
uses: pypa/gh-action-pypi-publish@release/v1
47+
with:
48+
packages-dir: dist/
49+
50+

0 commit comments

Comments
 (0)