ci: also append git SHA to version on push-to-main builds
This commit is contained in:
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user