Fix duplicate CI runs: remove tags trigger, detect tags on commit
Some checks failed
Build macOS / Build (macOS) (push) Failing after 3m31s
Build Linux / Build (Linux) (push) Failing after 7m22s
Build Windows / Build (Windows) (push) Successful in 16m5s

Pushing to main + a tag triggered 6 workflows (3 per trigger).
Now only main pushes trigger builds. The upload step detects version
tags on the current commit via git tag --points-at HEAD.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-03-21 11:30:57 -07:00
parent 2d0d4cfc50
commit b7a00af2e0
3 changed files with 15 additions and 16 deletions

View File

@@ -3,7 +3,6 @@ name: Build Windows
on:
push:
branches: [main]
tags: ["v*"]
pull_request:
branches: [main]
@@ -75,7 +74,7 @@ jobs:
# ── Release ──
- name: Upload to release
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
if: github.ref == 'refs/heads/main'
shell: powershell
env:
BUILD_TOKEN: ${{ secrets.BUILD_TOKEN }}
@@ -83,10 +82,10 @@ jobs:
$REPO_API = "${{ github.server_url }}/api/v1/repos/${{ github.repository }}"
$Headers = @{ "Authorization" = "token $env:BUILD_TOKEN" }
# Use version tag for tag pushes, "latest" for main
$REF = "${{ github.ref }}"
if ($REF.StartsWith("refs/tags/")) {
$TAG = $REF.Replace("refs/tags/", "")
# Check if the current commit has a version tag
$VERSION_TAG = (git tag --points-at HEAD | Select-String '^v').Line
if ($VERSION_TAG) {
$TAG = $VERSION_TAG
$RELEASE_NAME = "Voice to Notes ${TAG}"
$PRERELEASE = $false
} else {