Skip to content

Commit 2a973fa

Browse files
committed
ci: create GitHub release on each automated publish
1 parent b9ba966 commit 2a973fa

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
run: uv run pytest tests/test_factory.py -v
5858

5959
- name: Bump version in pyproject.toml and version.py
60+
id: bump
6061
if: steps.diff.outputs.changed == 'true' || github.event_name == 'workflow_dispatch'
6162
run: |
6263
python3 - <<'PY'
@@ -76,6 +77,7 @@ jobs:
7677
open("/tmp/new_version.txt", "w").write(new_ver)
7778
print(f"Bumped {ver} -> {new_ver} ({bump})")
7879
PY
80+
echo "version=$(cat /tmp/new_version.txt)" >> $GITHUB_OUTPUT
7981
8082
- name: Build
8183
if: steps.diff.outputs.changed == 'true' || github.event_name == 'workflow_dispatch'
@@ -95,3 +97,14 @@ jobs:
9597
git commit -m "release: v$VERSION"
9698
git tag "v$VERSION"
9799
git push --follow-tags
100+
101+
- name: Create GitHub release
102+
if: steps.diff.outputs.changed == 'true' || github.event_name == 'workflow_dispatch'
103+
uses: softprops/action-gh-release@v2
104+
with:
105+
tag_name: v${{ steps.bump.outputs.version }}
106+
generate_release_notes: true
107+
make_latest: 'true'
108+
files: |
109+
dist/*.whl
110+
dist/*.tar.gz

0 commit comments

Comments
 (0)