Skip to content

Commit

Permalink
validate that wp versions match in release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
circlecube committed Oct 25, 2023
1 parent f3dc75b commit 501d6fe
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/upload-asset-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,18 @@ jobs:
- name: Setup Registry
run: printf "\n//npm.pkg.github.com/:_authToken=${{ secrets.NEWFOLD_ACCESS_TOKEN }}" >> .npmrc

- name: npm install
- name: NPM Install
run: npm install --legacy-peer-deps

- name: Validate WP Versions
if: ${{ (github.repository == 'newfold-labs/wp-plugin-mojo') && (github.event.release.prerelease == false) }}
run: |
wpEnvVersion=`grep "WordPress/WordPress#tags/" .wp-env.json | grep -Eo "[0-9\.]*"`
pluginHeaderTestedVersion=`grep "Tested up to:" wp-plugin-mojo.php | grep -Eo "[0-9\.]*"`
echo "wp-env version: $wpEnvVersion"
echo "Plugin header tested version: $pluginHeaderTestedVersion"
[[ "$wpEnvVersion" == "$pluginHeaderTestedVersion" ]] || exit 1
- name: Build JavaScript
run: npm run build

Expand Down

0 comments on commit 501d6fe

Please sign in to comment.