Skip to content

Commit 755de8b

Browse files
fredteumerclaude
andauthored
[Releases] Add automated version bumping and release workflow (#470)
## Summary - Adds `auto-version-bump.yml` workflow that automatically creates version tags and GitHub releases on every push to `main` - Updates `release-artifacts.yml` to only trigger on tag pushes (removed conflicting `main` branch trigger) - Fixes broken conditional in `release-artifacts.yml` that was checking for `workflow_run` event on push triggers ## How it works 1. Push to `main` → `auto-version-bump.yml` auto-creates tag + GitHub release with release notes 2. Tag created → `release-artifacts.yml` runs to build/publish artifacts ## Test plan - [x] Created v0.4.0 tag manually as baseline - [ ] Merge this PR and verify next push to main creates v0.4.1 automatically - [ ] Verify release notes are generated correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- Co-authored-by: Claude <[email protected]>
1 parent e1452da commit 755de8b

File tree

2 files changed

+39
-3
lines changed

2 files changed

+39
-3
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Auto Version and Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
version-and-release:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Bump version and push tag
20+
id: tag_version
21+
uses: anothrNick/[email protected]
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
DEFAULT_BUMP: patch
25+
WITH_V: true
26+
RELEASE_BRANCHES: main
27+
INITIAL_VERSION: 0.4.0
28+
29+
- name: Create GitHub Release
30+
uses: ncipollo/release-action@v1
31+
with:
32+
tag: ${{ steps.tag_version.outputs.new_tag }}
33+
name: Release ${{ steps.tag_version.outputs.new_tag }}
34+
generateReleaseNotes: true
35+
body: |
36+
## Changes in this release
37+
38+
**Full Changelog**: https://github.com/${{ github.repository }}/compare/${{ steps.tag_version.outputs.tag }}...${{ steps.tag_version.outputs.new_tag }}

.github/workflows/release-artifacts.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
push:
55
tags:
66
- "v*.*.*"
7-
branches:
8-
- "main"
97
workflow_dispatch:
108
inputs:
119
custom_tag:
@@ -22,7 +20,7 @@ jobs:
2220
runs-on: ubuntu-22.04
2321
env:
2422
GITHUB_TOKEN: ${{ github.token }}
25-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
23+
if: startsWith(github.ref, 'refs/tags/v')
2624
steps:
2725
- uses: rymndhng/release-on-push-action@master
2826
with:

0 commit comments

Comments
 (0)