ci: include PR number in version suffix (e.g. 0.3.0-PR123-abc1234)

This commit is contained in:
deluan
2026-02-09 14:01:24 -05:00
parent 8e78f0b7f1
commit 64323ce2f2
+4 -2
View File
@@ -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