From 7e370a0eaba9463d5ee87b58d9ab11d515bfd2f1 Mon Sep 17 00:00:00 2001 From: EliotJones Date: Sun, 15 Feb 2026 14:24:17 -0400 Subject: [PATCH] confirm tag is on master before running publish --- .github/workflows/publish_nuget.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/publish_nuget.yml b/.github/workflows/publish_nuget.yml index ab5693a3..7119bbd0 100644 --- a/.github/workflows/publish_nuget.yml +++ b/.github/workflows/publish_nuget.yml @@ -15,6 +15,14 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Verify tag points to master + id: verify + run: | + TAG_COMMIT=$(git rev-list -n 1 ${{ github.ref_name }}) + if ! git branch -r --contains $TAG_COMMIT | grep -q 'origin/master'; then + echo "Tag is not on master — skipping publish" + exit 78 # 78 = neutral in GitHub Actions + fi - name: Set up .NET uses: actions/setup-dotnet@v4