Skip to content

Commit

Permalink
Merge pull request #168 from 10up/enhancement/167
Browse files Browse the repository at this point in the history
Added "Build release zip" GitHub Action
  • Loading branch information
faisal-alvi authored Dec 6, 2022
2 parents d1000c4 + 182408b commit 2774a0f
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build-release-zip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build release zip

on:
workflow_dispatch:
push:
branches:
- trunk

jobs:
build:
name: Build release zip
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}

- name: Setup node version and npm cache
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'

- name: Install Node dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm install

- name: Build plugin
run: npm run build

- name: Generate ZIP file
uses: 10up/action-wordpress-plugin-build-zip@stable
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ The `develop` branch is the development branch which means it contains the next
- [ ] Merge: Make a non-fast-forward merge from your release branch to `develop` (or merge the pull request), then do the same for `develop` into `trunk` (`git checkout trunk && git merge --no-ff develop`). `trunk` contains the latest stable release.
- [ ] Test: Run through common tasks while on `trunk` to be sure it functions correctly.
- [ ] Push: Push your `trunk` branch to GitHub (e.g. `git push origin trunk`).
- [ ] Test the pre-release ZIP locally by downloading it from the **Build release zip** action artifact to ensure the plugin doesn't break after release.
- [ ] Release: Create a [new release](https://github.com/10up/simple-local-avatars/releases/new), naming the tag and the release with the new version number, and targeting the `trunk` branch. Paste the changelog from `CHANGELOG.md` into the body of the release and include a link to the [closed issues on the milestone](https://github.com/10up/simple-local-avatars/milestone/#?closed=1).
- [ ] SVN: Wait for the [GitHub Action](https://github.com/10up/simple-local-avatars/actions) to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
- [ ] Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/simple-local-avatars/. This may take a few minutes.
Expand Down

0 comments on commit 2774a0f

Please sign in to comment.