Skip to content

Commit b09711c

Browse files
author
blin
committed
ci: auto-bump version on push via shared reusable workflow
release.yaml now triggers on push to config-watch branch (in addition to tags). Uses smpl-os/.github auto-release.yml with git-tag mode to bump version and create tag before building.
1 parent e0eab19 commit b09711c

1 file changed

Lines changed: 23 additions & 4 deletions

File tree

.github/workflows/release.yaml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,30 @@
11
name: Release builds
2+
23
on:
3-
workflow_dispatch: # Allows manual trigger
44
push:
5+
branches:
6+
- config-watch
57
tags:
6-
- 'v*.*.*' # automatically react on semantic versioned tags
8+
- 'v*.*.*'
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: write
13+
714
jobs:
15+
bump:
16+
if: github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')
17+
uses: smpl-os/.github/.github/workflows/auto-release.yml@main
18+
with:
19+
version-file: git-tag
20+
branch: config-watch
21+
secrets: inherit
22+
823
release:
24+
needs: bump
25+
if: always() && (needs.bump.result == 'success' && needs.bump.outputs.skipped != 'true' || startsWith(github.ref, 'refs/tags/'))
926
runs-on: ubuntu-latest
10-
permissions:
11-
contents: write
27+
1228
steps:
1329
- name: Setup Go
1430
uses: actions/setup-go@v5
@@ -21,6 +37,7 @@ jobs:
2137
with:
2238
fetch-depth: 0
2339
fetch-tags: true
40+
ref: ${{ needs.bump.outputs.sha || github.ref }}
2441

2542
- name: Build (optimized for smplOS)
2643
run: |
@@ -39,6 +56,8 @@ jobs:
3956
- name: Publish
4057
uses: softprops/action-gh-release@v2
4158
with:
59+
tag_name: ${{ needs.bump.outputs.tag || github.ref_name }}
60+
generate_release_notes: true
4261
files: binaries/*
4362

4463
- name: Cleanup

0 commit comments

Comments
 (0)