Skip to content

Commit 9495c58

Browse files
committed
add github release to workflow
1 parent f6a0611 commit 9495c58

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.env export-ignore
2+
.git export-ignore
3+
.idea export-ignore
4+
.pytest_cache export-ignore
5+
.venv export-ignore
6+
venv export-ignore
7+
dist export-ignore

.github/workflows/release.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,25 @@ jobs:
3434
rm -rf build dist *.egg-info
3535
make build ENV=stage
3636
37+
- name: Extract Version from pyproject.toml
38+
id: get_version
39+
run: |
40+
# Extract the version assuming a line like: version = "0.1.0"
41+
VERSION=$(grep -Po '^version\s*=\s*"\K[^"]+' pyproject.toml)
42+
echo "Version extracted: $VERSION"
43+
echo "version=$VERSION" >> $GITHUB_OUTPUT
44+
45+
- name: Create GitHub Release
46+
id: create_release
47+
uses: actions/create-release@v1
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
with:
51+
tag_name: v${{ steps.get_version.outputs.version }}
52+
release_name: v${{ steps.get_version.outputs.version }}
53+
draft: false
54+
prerelease: false
55+
3756
- name: Install Twine
3857
run: |
3958
source venv/bin/activate

0 commit comments

Comments
 (0)