Skip to content

Commit 921269b

Browse files
committed
add manual release action & more release docs
1 parent 09a76ba commit 921269b

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

.github/workflows/release_unreleased_prs.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
name: Release unreleased PR
1+
name: Release unreleased PRs
22

33
# Runs when a PR merges.
44
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-your-workflow-when-a-pull-request-merges
55
on:
6+
workflow_dispatch:
67
pull_request:
78
types:
89
- closed
910

1011
jobs:
1112
release:
12-
if: github.event.pull_request.merged == true
13+
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
1314
runs-on: ubuntu-latest
1415
container: dart:2.14.4
1516
permissions:

CONTRIBUTING.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,18 @@ If you get on IRC and ask us, we can review your work and add you as a committer
4343

4444
This repo is now configured to release after every PR merge. This means a couple things for PRs that are put up:
4545

46-
1. A semver label is required. A github check will remind you that you need one. Reviewers should check that it is correct.
46+
1. A semver label is required. A github check will remind you that you need one. Reviewers should check that it is correct. See https://semver.org/ to understand more.
4747
2. There is no need to modify the version in the pubspec.yaml in your PRs. The tooling will update the version according to the semver label applied to your PR.
4848
3. Same thing for the CHANGELOG.md. Tooling will update it automatically after merge.
49-
4. A github release will be created and published ot pub.dev for you.
49+
4. A github release will be created and published to pub.dev for you.
50+
51+
For example if your PR has `semver:minor` label applied and the latest version is 1.2.3, once merged, the tooling will:
52+
- update the pubspec.yaml to 1.3.0
53+
- Add the github auto-generated release notes with 1.3.0 to the top of the CHANGELOG.md
54+
- Create a release in github for 1.3.0 (which creates a git tag of 1.3.0)
55+
- Remove the `unreleased` label from the PR and add the `released` label
56+
- Comment on the PR stating the version that it was released in and link to the release
57+
- When the release is created, it will automatically be published to pub.dev
58+
59+
NOTE: If you want the ability to merge a PR **WITHOUT** automatically releasing and publishing, simply add the `no_release_on_merge` label before merging. Do note that the PR has been merged though and whatever the next PR is that triggers a release will release and publish everything that has been merged. So if you want to batch a few PRs into 1 release, label them all `no_release_on_merge`. Then whichever is the last to be merged, remove that label before merging to trigger the release.
60+
You may also manually trigger the action to release unreleased PRs from the Actions tab in Github.

0 commit comments

Comments
 (0)