Skip to content

Commit

Permalink
Update auto-build to handle version updates from package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
sc0ttkclark committed Dec 11, 2023
1 parent b99999e commit 2d40af5
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/auto-build.yml
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:
Expand Down Expand Up @@ -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

0 comments on commit 2d40af5

Please sign in to comment.