Deploy Commit "Update create-readme.js" to WordPress.org #62
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 | |
run-name: Deploy Commit "${{ github.event.head_commit.message }}" to WordPress.org | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
commit: | |
name: Deploying | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- uses: actions/checkout@master | |
- id: commit-type | |
name: Check Commit Type | |
uses: gsactions/commit-message-checker@v2 | |
with: | |
pattern: '^\d*\.\d*\.\d*$' | |
error: 'The commit message does not look like a version number. Please use semantic versioning (https://semver.org/).' | |
- name: Find and Replace Version | |
uses: jacobtomlinson/gha-find-replace@v3 | |
with: | |
find: "__MGD_VERSION__" | |
replace: ${{ github.event.head_commit.message }} | |
regex: false | |
- name: Install Dependencies | |
run: | | |
npm install | |
composer install | |
npm run tailwind_build | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
tag_name: ${{ github.event.head_commit.message }} | |
release_name: Release ${{ github.event.head_commit.message }} | |
body: "" | |
draft: false | |
prerelease: false | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Create readme.txt | |
run: 'node ./create-readme.js' | |
# Helpers.php gets renamed to helpers.php for some reason | |
# - name: Rename Helpers file | |
# run: mv inc/helpers.php inc/Helpers.php | |
# - name: Delete Old Helpers file | |
# run: rm -f inc/helpers.php | |
- name: WordPress Plugin Deploy | |
uses: 10up/action-wordpress-plugin-deploy@stable | |
env: | |
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | |
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | |
SLUG: gitdown # optional, remove if GitHub repo name matches SVN slug, including capitalization | |
VERSION: ${{ github.event.head_commit.message }} |