Skip to content

Commit

Permalink
Merge pull request #119 from 10up/enhancement/117
Browse files Browse the repository at this point in the history
Update "Build release zip" workflow to use 10up's plugin-build-zip action.
  • Loading branch information
dkotter authored Dec 2, 2022
2 parents a18d7e1 + a0b71a1 commit bab2ad2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 120 deletions.
27 changes: 1 addition & 26 deletions .github/workflows/build-release-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Cache vendor
id: cache-composer
uses: actions/cache@v3
env:
cache-name: cache-vendor
with:
path: |
vendor
~/.composer/cache
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}

- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v3
Expand All @@ -44,22 +33,8 @@ jobs:
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci --no-optional

- name: Install Composer dependencies
if: steps.cache-vendor.outputs.cache-hit != 'true'
run: composer install --no-dev

- name: Build plugin
run: npm run build

- name: Generate ZIP file
run: bash bin/build-zip.sh

- name: Unzip the file (prevents double zip problem)
run: unzip ${{ github.event.repository.name }}.zip -d zipfile

- name: Upload the ZIP file as an artifact
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}
path: zipfile
retention-days: 5
uses: 10up/action-wordpress-plugin-build-zip@stable
11 changes: 6 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ Head to the Pages list table and drag and drop pages to change the order. Refres
6. Readme updates: Make any other readme changes as necessary. `README.md` is geared toward GitHub and `readme.txt` contains WordPress.org-specific content. The two are slightly different.
7. 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 stable development version.
8. Push: Push your `trunk` branch to GitHub (e.g. `git push origin trunk`).
9. Release: Create a [new release](https://github.com/10up/simple-page-ordering/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 [X.Y.Z milestone](https://github.com/10up/simple-page-ordering/milestone/#?closed=1). The release should now appear under [releases](https://github.com/10up/simple-page-ordering/releases) and in the WordPress admin as an update as well.
10. SVN: Wait for the [GitHub Action](https://github.com/10up/simple-page-ordering/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.
11. Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/simple-page-ordering/. This may take a few minutes.
12. Close milestone: Edit the [X.Y.Z milestone](https://github.com/10up/simple-page-ordering/milestone/#) with release date (in the `Due date (optional)` field) and link to GitHub release (in the `Description field`), then close the milestone.
13. Punt incomplete items: If any open issues or PRs which were milestoned for `X.Y.Z` do not make it into the release, update their milestone to `X.Y.Z+1`, `X.Y+1.0`, `X+1.0.0` or `Future Release`.
9. 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.
10. Release: Create a [new release](https://github.com/10up/simple-page-ordering/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 [X.Y.Z milestone](https://github.com/10up/simple-page-ordering/milestone/#?closed=1). The release should now appear under [releases](https://github.com/10up/simple-page-ordering/releases) and in the WordPress admin as an update as well.
11. SVN: Wait for the [GitHub Action](https://github.com/10up/simple-page-ordering/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.
12. Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/simple-page-ordering/. This may take a few minutes.
13. Close milestone: Edit the [X.Y.Z milestone](https://github.com/10up/simple-page-ordering/milestone/#) with release date (in the `Due date (optional)` field) and link to GitHub release (in the `Description field`), then close the milestone.
14. Punt incomplete items: If any open issues or PRs which were milestoned for `X.Y.Z` do not make it into the release, update their milestone to `X.Y.Z+1`, `X.Y+1.0`, `X+1.0.0` or `Future Release`.
89 changes: 0 additions & 89 deletions bin/build-zip.sh

This file was deleted.

0 comments on commit bab2ad2

Please sign in to comment.