Skip to content

Commit 9543fc0

Browse files
committed
add build version
1 parent 6bac85d commit 9543fc0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/build-dev-artifacts.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ jobs:
3737
- name: Create zip
3838
run: |
3939
npm ci
40-
npm run build
40+
npm run build
41+
CURRENT_VERSION=$(node -p -e "require('./package.json').version")
42+
COMMIT_HASH=$(git rev-parse --short HEAD)
43+
DEV_VERSION="${CURRENT_VERSION}-dev.${COMMIT_HASH}"
44+
npm run grunt version::${DEV_VERSION}
4145
npm run dist
4246
- name: Retrieve branch name
4347
id: retrieve-branch-name

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"lint:js": "wp-scripts lint-js ./js",
3232
"release": "semantic-release --debug",
3333
"dist": "bash bin/dist.sh",
34+
"grunt": "grunt",
3435
"test:e2e": "wp-scripts test-playwright --config tests/e2e/playwright.config.js",
3536
"test:e2e:debug": "wp-scripts test-playwright --config tests/e2e/playwright.config.js --ui",
3637
"wp-env": "wp-env"

0 commit comments

Comments
 (0)