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-<sha> before packaging.
This commit is contained in:
deluan
2026-02-09 13:59:57 -05:00
parent 223ebf0539
commit 8e78f0b7f1
+6
View File
@@ -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