From 8e78f0b7f1f2bb0ad99f5b62419ce28f8759da58 Mon Sep 17 00:00:00 2001 From: deluan Date: Mon, 9 Feb 2026 13:59:57 -0500 Subject: [PATCH 1/2] ci: append git SHA to manifest version in PR builds Makes PR artifacts distinguishable from releases by patching the manifest version to X.Y.Z- before packaging. --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c445bd0..0d0f0e4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,6 +30,12 @@ jobs: - name: Run tests run: make test + - name: Append git SHA to version + if: github.event_name == 'pull_request' + run: | + SHA=$(echo "${{ github.event.pull_request.head.sha }}" | cut -c1-7) + jq --arg sha "$SHA" '.version = .version + "-" + $sha' manifest.json > manifest.tmp && mv manifest.tmp manifest.json + - name: Build and package plugin run: make package -- 2.52.0 From 64323ce2f2923b941ad304694f7e9dc9cdfe63a6 Mon Sep 17 00:00:00 2001 From: deluan Date: Mon, 9 Feb 2026 14:01:24 -0500 Subject: [PATCH 2/2] ci: include PR number in version suffix (e.g. 0.3.0-PR123-abc1234) --- .github/workflows/build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0d0f0e4..3b9d71d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,11 +30,13 @@ jobs: - name: Run tests run: make test - - name: Append git SHA to version + - name: Append PR info to version if: github.event_name == 'pull_request' run: | + PR_NUM=${{ github.event.pull_request.number }} SHA=$(echo "${{ github.event.pull_request.head.sha }}" | cut -c1-7) - jq --arg sha "$SHA" '.version = .version + "-" + $sha' manifest.json > manifest.tmp && mv manifest.tmp manifest.json + SUFFIX="PR${PR_NUM}-${SHA}" + jq --arg suffix "$SUFFIX" '.version = .version + "-" + $suffix' manifest.json > manifest.tmp && mv manifest.tmp manifest.json - name: Build and package plugin run: make package -- 2.52.0