Skip to content

Commit 91f8f39

Browse files
authored
Merge pull request #107 from 10up/add/release-workflow
Add release workflow
2 parents 5c31dd4 + ba8bc03 commit 91f8f39

3 files changed

Lines changed: 36 additions & 11 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
- [x] Branch: Starting from `develop`, cut a release branch named `release/X.Y.Z` for your changes.
2+
- [ ] Changelog: Add/update the changelog in `CHANGELOG.md`.
3+
- [ ] Props: update `CREDITS.md` file with any new contributors, confirm maintainers are accurate.
4+
- [ ] Readme updates: Make any other readme changes as necessary in `README.md`.
5+
- [ ] Merge: Make a non-fast-forward merge from your release branch to `develop` (or merge the pull request), then merge `develop` into `stable` (`git checkout stable && git merge --no-ff develop`).
6+
- [ ] Push: Push your stable branch to GitHub (e.g. `git push origin stable`).
7+
- [ ] Release: Create a [new release](https://github.com/10up/action-wordpress-plugin-deploy/releases/new), naming the tag and the release with the new version number, and targeting the `stable` 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/action-wordpress-plugin-deploy/milestones/#?closed=1). The release should now appear under [releases](https://github.com/10up/action-wordpress-plugin-deploy/releases).
8+
- [ ] Ensure the release [appears in the GitHub Marketplace](https://github.com/marketplace/actions/wordpress-plugin-deploy) correctly.
9+
- [ ] Close milestone: Edit the [milestone](https://github.com/10up/action-wordpress-plugin-deploy/milestones/) with release date (in the `Due date (optional)` field) and link to GitHub release (in the `Description field`), then close the milestone.
10+
- [ ] 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+- [ ]0`, `X+- [ ]0.0` or `Future Release`.
11+
- [ ] Celebrate shipping!
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Release Pull Request Automation
2+
3+
on:
4+
create:
5+
jobs:
6+
release-pull-request-automation:
7+
if: ${{ github.event.ref_type == 'branch' && contains( github.ref, 'release/' ) }}
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v3
12+
- name: Generate title
13+
run: |
14+
BRANCH=${GITHUB_REF##*/}
15+
echo $BRANCH
16+
VERSION=${BRANCH#'release/'}
17+
echo ::set-output name=result::"Release: ${VERSION}"
18+
id: title
19+
- name: Create Pull Request
20+
run: gh pr create --title "${{ steps.title.outputs.result }}" --body-file ./.github/release-pull-request-template.md
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CONTRIBUTING.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,6 @@ This repository currently uses the `develop` branch to reflect active work and `
2828

2929
## Release instructions
3030

31-
1. Branch: Starting from `develop`, cut a release branch named `release/X.Y.Z` for your changes.
32-
1. Changelog: Add/update the changelog in `CHANGELOG.md`.
33-
1. Props: update `CREDITS.md` file with any new contributors, confirm maintainers are accurate.
34-
1. Readme updates: Make any other readme changes as necessary in `README.md`.
35-
1. Merge: Make a non-fast-forward merge from your release branch to `develop` (or merge the pull request), then merge `develop` into `stable` (`git checkout stable && git merge --no-ff develop`).
36-
1. Push: Push your stable branch to GitHub (e.g. `git push origin stable`).
37-
1. Release: Create a [new release](https://github.com/10up/action-wordpress-plugin-deploy/releases/new), naming the tag and the release with the new version number, and targeting the `stable` 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/action-wordpress-plugin-deploy/milestones/#?closed=1). The release should now appear under [releases](https://github.com/10up/action-wordpress-plugin-deploy/releases).
38-
1. Ensure the release [appears in the GitHub Marketplace](https://github.com/marketplace/actions/wordpress-plugin-deploy) correctly.
39-
1. Close milestone: Edit the [milestone](https://github.com/10up/action-wordpress-plugin-deploy/milestones/) with release date (in the `Due date (optional)` field) and link to GitHub release (in the `Description field`), then close the milestone.
40-
1. 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`.
41-
1. Celebrate shipping!
31+
A new release pull requestwill be created automatically once a branch named `release/X.Y.Z` is pushed to GitHub.
32+
33+
The step by step release instructions can be found in [.github/release-pull-request-template.md](.github/release-pull-request-template.md).

0 commit comments

Comments
 (0)