Skip to content

Commit

Permalink
chore: use commit version in dev build (#339)
Browse files Browse the repository at this point in the history
  • Loading branch information
Soare-Robert-Daniel authored Aug 29, 2024
1 parent da35673 commit 649358f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/create-build-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and publish the ZIP build file

on:
pull_request:
types: [ opened, synchronize, ready_for_review ]
types: [opened, synchronize, ready_for_review]
branches-ignore:
- "update_dependencies"
concurrency:
Expand All @@ -18,7 +18,7 @@ jobs:
git-sha-8: ${{ steps.retrieve-git-sha-8.outputs.sha8 }}
steps:
- name: Check out source files
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Get Composer Cache Directory
id: composer-cache
run: |
Expand All @@ -36,6 +36,12 @@ jobs:
run: yarn install --frozen-lockfile
- name: Build files
run: yarn run build
- name: Bump the plugin version
run: |
CURRENT_VERSION=$(node -p -e "require('./package.json').version")
COMMIT_HASH=$(git rev-parse --short HEAD)
DEV_VERSION="${CURRENT_VERSION}-dev.${COMMIT_HASH}"
npm run grunt version::${DEV_VERSION}
- name: Create zip
run: yarn run dist
- name: Retrieve branch name
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"dist": "bash ./bin/dist.sh",
"release": "npx semantic-release",
"build:makepot": "bash ./bin/makepot.sh",
"build:grunt": "grunt build"
"build:grunt": "grunt build",
"grunt": "grunt"
}
}

0 comments on commit 649358f

Please sign in to comment.