Fix Image URL Localization URI #174
Workflow file for this run
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
name: Deploy to WordPress.org | |
on: | |
pull_request: | |
types: [closed] | |
branches: | |
- trunk | |
jobs: | |
deploy-to-wordpress: | |
if: > | |
github.event_name == 'pull_request' && | |
github.event.pull_request.merged == true && | |
startsWith(github.event.pull_request.head.ref, 'release/') && | |
( contains(github.event.pull_request.head.ref, '/major') || contains(github.event.pull_request.head.ref, '/minor') || contains(github.event.pull_request.head.ref, '/patch') ) && | |
( github.event.pull_request.user.login == 'github-actions[bot]' ) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Install node dependencies | |
run: npm install | |
- name: Compile JavaScript App | |
run: npm run build | |
- name: Get New Version | |
id: get-version | |
run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT | |
- name: Create Tag and Release on GitHub | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
VERSION=v${{ steps.get-version.outputs.VERSION }} | |
git tag $VERSION | |
git push origin $VERSION | |
gh release create $VERSION --generate-notes | |
- name: Deploy Plugin to WordPress Plugin Directory | |
uses: 10up/action-wordpress-plugin-deploy@stable | |
env: | |
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | |
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | |
VERSION: ${{ steps.get-version.outputs.VERSION }} | |
- name: WordPress.org plugin asset/readme update | |
uses: 10up/action-wordpress-plugin-asset-update@stable | |
env: | |
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | |
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} |