From 1a236fd00f3d6b13698978057086238d1ecbfdb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deluan=20Quint=C3=A3o?= Date: Mon, 9 Feb 2026 14:28:18 -0500 Subject: [PATCH 1/2] ci: append git SHA to manifest version in PR builds (#14) --- .github/workflows/build.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c445bd0..3b9d71d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,6 +30,14 @@ jobs: - name: Run tests run: make test + - 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) + 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 From 8d07bc612036aa4b16903cd7c300d1a4bbb794cb Mon Sep 17 00:00:00 2001 From: deluan Date: Mon, 9 Feb 2026 14:32:25 -0500 Subject: [PATCH 2/2] ci: also append git SHA to version on push-to-main builds --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b9d71d..dec0b97 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,6 +38,12 @@ jobs: SUFFIX="PR${PR_NUM}-${SHA}" jq --arg suffix "$SUFFIX" '.version = .version + "-" + $suffix' manifest.json > manifest.tmp && mv manifest.tmp manifest.json + - name: Append git SHA to version + if: github.event_name == 'push' + run: | + SHA=$(echo "${{ github.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