-
-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update auto-build to handle version updates from package.json
- Loading branch information
1 parent
b99999e
commit 2d40af5
Showing
1 changed file
with
14 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
name: 'Auto Build' | ||
env: | ||
WPORG_PLUGIN_FILE: 'init.php' | ||
WPORG_PLUGIN_VERSION_CONSTANT_NAME: 'PODS_VERSION' | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
|
@@ -32,9 +35,17 @@ jobs: | |
run: npm install | ||
- name: Maybe build Pods Blocks JS API, Pods DFV, and styles assets | ||
run: npm run build-production | ||
- name: Maybe update version number | ||
run: npm run version_number | ||
- name: Check the version number | ||
shell: bash | ||
run: PLUGIN_VERSION=`jq -r .version package.json` | ||
- name: Run wporg-replace | ||
uses: sc0ttkclark/[email protected] | ||
with: | ||
plugin_version: ${{ PLUGIN_VERSION }} | ||
plugin_version_constant_name: ${{ env.WPORG_PLUGIN_VERSION_CONSTANT_NAME }} | ||
plugin_file: ${{ env.WPORG_PLUGIN_FILE }} | ||
plugin_path: ${{ github.workspace }} | ||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
file_pattern: ui/js/blocks/pods-blocks-api.min.* ui/js/dfv/pods-dfv.min.* ui/styles/dist/*.css readme.txt init.php | ||
file_pattern: ui/js/blocks/pods-blocks-api.min.* ui/js/dfv/pods-dfv.min.* ui/styles/dist/*.css readme.txt ${{ env.WPORG_PLUGIN_FILE }} | ||
commit_message: Auto rebuild assets |