fix: trigger build workflow from release event instead of tag push

Tag pushes created by semantic-release via the GitHub API do not
trigger push-based workflows. Switch to the release event which
fires when semantic-release creates the draft GitHub release.
This commit is contained in:
2026-02-13 23:28:39 -06:00
parent e77a44d4ca
commit 47772f73cc
+8 -7
View File
@@ -1,16 +1,15 @@
name: Build & Publish
run-name: Build ${{ github.ref_name }}
run-name: Build ${{ github.event.release.tag_name }}
on:
push:
tags:
- "v*"
release:
types: [created]
permissions:
contents: write
concurrency:
group: build-${{ github.ref_name }}
group: build-${{ github.event.release.tag_name }}
cancel-in-progress: false
env:
@@ -45,6 +44,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}
submodules: recursive
- uses: actions/setup-go@v5
@@ -77,7 +77,8 @@ jobs:
id: version
shell: bash
run: |
VERSION="${GITHUB_REF_NAME#v}"
VERSION="${{ github.event.release.tag_name }}"
VERSION="${VERSION#v}"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "Building version: $VERSION"
@@ -161,7 +162,7 @@ jobs:
# The release was already created as a draft by semantic-release.
# This step finds it by tag and attaches binaries, then publishes.
draft: false
tag_name: ${{ github.ref_name }}
tag_name: ${{ github.event.release.tag_name }}
fail_on_unmatched_files: true
files: |
artifacts/yellowjacket-linux-amd64