Fix/update wporg related versions (#63) #49
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 Repository | |
# on: | |
# release: | |
# types: [published] | |
# jobs: | |
# deploy-to-wp-repository: | |
# name: Deploy to WP.org | |
# if: ${{ ! github.event.release.prerelease }} | |
# runs-on: ubuntu-latest | |
# steps: | |
on: | |
# release: | |
# types: [edited] | |
push: | |
commit_message: 'Update version-numbers to ' | |
# branches: | |
# - main | |
jobs: | |
deploy-to-wp-repository: | |
name: Deploy to WP.org | |
runs-on: ubuntu-latest | |
# if: github.event.release.edited == true && contains(github.event.head_commit.message, 'Update wporg-related-version to ') | |
# if: contains(github.event.head_commit.message, 'Update wporg-related-version to ') | |
if: | | |
contains(github.event.head_commit.message, 'Update version-numbers to ') && | |
contains(github.event.head_commit.modified, 'readme.md') | |
steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v4 | |
# - name: Build | |
# run: | | |
# npm install | |
# npm run build | |
# # - name: WordPress.org Plugin Deploy | |
# # id: deploy | |
# # uses: 10up/action-wordpress-plugin-deploy@stable | |
# # with: | |
# # generate-zip: true | |
# # env: | |
# # SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | |
# # SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: latest | |
coverage: none | |
tools: wp-cli | |
- name: Install latest version of dist-archive-command | |
run: wp package install wp-cli/dist-archive-command:dev-main | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
# Make sure to use the same version like WordPress/gutenberg. | |
# node-version-file: '.nvmrc' | |
node-version: v20.11.1 | |
cache: npm | |
- name: Install dependencies | |
run: npm ci | |
- name: Build plugin | |
run: | | |
npm run build | |
wp dist-archive . ./${{ github.event.repository.name }}.zip | |
# mkdir tmp-build | |
# unzip ${{ github.event.repository.name }}.zip -d tmp-build | |
- name: Upload release asset | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: ${{ github.workspace }}/${{ github.event.repository.name }}.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |