chore(release): 2.7.0 #46
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: Release Production Build | |
on: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
- "!v[0-9]+.[0-9]+.[0-9]+-" | |
jobs: | |
deploy: | |
name: Release Production Build | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [14.x] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Get Release Number | |
id: package-version | |
uses: martinbeentjes/npm-get-version-action@master | |
- name: Install node dependencies | |
run: npm ci | |
- name: Install composer dependencies | |
run: composer install | |
- name: Lint JavaScript source code | |
run: npm run lint | |
- name: Lint PHP source code | |
run: composer lint | |
- name: Test JavaScript source code | |
run: npm test | |
- name: Build JavaScript artifact | |
run: npm run build | |
- name: Build PHP artifact | |
run: composer build ./ ./Force-Refresh-${{ steps.package-version.outputs.current-version}}.zip | |
- name: Create release notes | |
run: npm run createWpReadme | |
- name: Prune JavaScript dependencies | |
run: npm prune --production | |
- name: Prune PHP dependencies | |
run: composer install --no-dev --no-scripts | |
- name: Deploy plugin to WordPress.org | |
uses: 10up/action-wordpress-plugin-deploy@stable | |
env: | |
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | |
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | |
SLUG: force-refresh | |
- name: Get Changelog Entry | |
id: get_changelog_entry | |
uses: yashanand1910/standard-release-notes@v1.2.1 | |
with: | |
version: ${{ github.ref }} | |
- name: Create Release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./Force-Refresh-${{ steps.package-version.outputs.current-version}}.zip | |
asset_name: Force_Refresh_v${{ steps.package-version.outputs.current-version}}.zip | |
tag: ${{ github.ref }} | |
release_name: Force Refresh ${{ steps.package-version.outputs.current-version }} | |
prerelease: false | |
body: "This is a production release of Force Refresh (v${{ steps.package-version.outputs.current-version }}). This version, and all production-stable versions, are available at https://wordpress.org/plugins/force-refresh/. \n\n**Release Notes**\n${{ steps.get_changelog_entry.outputs.release_notes }}" |