Skip to content

Commit d3f1605

Browse files
authored
Merge pull request #15 from paywithextend/add-github-release
add GitHub release to workflow
2 parents c5a260c + 9495c58 commit d3f1605

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
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

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "paywithextend"
7-
version = "0.1.0"
7+
version = "1.0.0"
88
description = "Python client for the Extend API"
99
readme = "README.md"
1010
authors = [{ name = "Extend Engineering", email = "support@paywithextend.com" }]

0 commit comments

Comments
 (0)