Skip to content

Commit

Permalink
Merge pull request #291 from newfold-labs/update/release-workflow-to-…
Browse files Browse the repository at this point in the history
…validate-wordpress-versions

validate that tested version of wp matches the wp-env version
  • Loading branch information
circlecube committed Oct 26, 2023
2 parents 520025a + dfb34d2 commit 59b36e8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/upload-asset-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ jobs:
- name: NPM Install
run: npm install --legacy-peer-deps

- name: Validate WP Versions
if: ${{ (github.repository == 'newfold-labs/wp-plugin-hostgator') && (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-hostgator.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 59b36e8

Please sign in to comment.