Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update release process to maintain both v2 and v1 releases #995

Merged
merged 22 commits into from
Mar 25, 2022
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
2a7a517
Remove unused `repository_dispatch` trigger
henrymercer Mar 17, 2022
b386fd4
Parameterize release branch workflow over source and target branches
henrymercer Mar 17, 2022
81827d3
Use the person triggering the release workflow as the conductor
henrymercer Mar 17, 2022
ccda44c
Handle missing author information when generating changelog
henrymercer Mar 17, 2022
33f749f
Set up `main -> v2`, `v2 -> v1`, and `v2 -> main` merges
henrymercer Mar 17, 2022
d76b182
Add functionality for `v2 -> v1` backports
henrymercer Mar 17, 2022
4b465cb
Dump environment and GitHub context
henrymercer Mar 22, 2022
b8f3a37
Fix exception when there are no commits to merge
henrymercer Mar 22, 2022
124e7d9
Stop versioning the runner
henrymercer Mar 22, 2022
5fb01dd
Avoid commits with duplicate names during v2 to v1 backport
henrymercer Mar 22, 2022
bd4757c
Update the changelog and version number in a single commit
henrymercer Mar 22, 2022
1668e0a
Only mention merging the mergeback PR in the checklist when relevant
henrymercer Mar 22, 2022
0b037b4
Add merging the v1 release PR to the checklist
henrymercer Mar 23, 2022
f143182
Add "Update dependencies" label to v1 release PR
henrymercer Mar 23, 2022
3359990
Avoid conflicts by reverting 1.x version num commit from last v1 release
henrymercer Mar 23, 2022
da7944b
Update release process doc
henrymercer Mar 24, 2022
9d26fe0
Use source branch and target branch names consistently
henrymercer Mar 25, 2022
bed132d
Use a more restrictive `sed` pattern
henrymercer Mar 25, 2022
d0bd808
Expose a more restrictive interface to the release script
henrymercer Mar 25, 2022
f784647
Merge branch 'main' into henrymercer/update-release-process
henrymercer Mar 25, 2022
044f112
Update branch protection instructions
henrymercer Mar 25, 2022
839aa81
Merge branch 'main' into henrymercer/update-release-process
henrymercer Mar 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update release process doc
  • Loading branch information
henrymercer committed Mar 24, 2022
commit da7944b1654f45f347b4222e255c7955ccc80303
20 changes: 13 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,22 @@ Here are a few things you can do that will increase the likelihood of your pull
## Releasing (write access required)

1. The first step of releasing a new version of the `codeql-action` is running the "Update release branch" workflow.
This workflow goes through the pull requests that have been merged to `main` since the last release, creates a changelog, then opens a pull request to merge the changes since the last release into the `v1` release branch.
This workflow goes through the pull requests that have been merged to `main` since the last release, creates a changelog, then opens a pull request to merge the changes since the last release into the `v2` release branch.

A release is automatically started every Monday via a scheduled run of this workflow, however you can start a release manually by triggering a run via [workflow dispatch](https://github.com/github/codeql-action/actions/workflows/update-release-branch.yml).
1. The workflow run will open a pull request titled "Merge main into v1". Mark the pull request as [ready for review](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request#marking-a-pull-request-as-ready-for-review) to trigger the PR checks.
You can start a release by triggering this workflow via [workflow dispatch](https://github.com/github/codeql-action/actions/workflows/update-release-branch.yml).
1. The workflow run will open a pull request titled "Merge main into v2". Mark the pull request as [ready for review](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request#marking-a-pull-request-as-ready-for-review) to trigger the PR checks.
1. Review the checklist items in the pull request description.
Once you've checked off all but the last of these, approve the PR and automerge it.
1. When the "Merge main into v1" pull request is merged into the `v1` branch, the "Tag release and merge back" workflow will create a mergeback PR.
This mergeback incorporates the changelog updates into `main`, tags the release using the merge commit of the "Merge main into v1" pull request, and bumps the patch version of the CodeQL Action.
Once you've checked off all but the last two of these, approve the PR and automerge it.
1. When the "Merge main into v2" pull request is merged into the `v2` branch, the "Tag release and merge back" workflow will create a mergeback PR.
This mergeback incorporates the changelog updates into `main`, tags the release using the merge commit of the "Merge main into v2" pull request, and bumps the patch version of the CodeQL Action.

Approve the mergeback PR and automerge it. Once the mergeback has been merged into main, the release is complete.
Approve the mergeback PR and automerge it.
1. When the "Merge main into v2" pull request is merged into the `v2` branch, the "Update release branch" workflow will create a "Merge v2 into v1" pull request to merge the changes since the last release into the `v1` release branch.
henrymercer marked this conversation as resolved.
Show resolved Hide resolved
This ensures we keep both the `v1` and `v2` release branches up to date and fully supported.

Review the checklist items in the pull request description.
Once you've checked off all the items, approve the PR and automerge it.
1. Once the mergeback has been merged to `main` and the "Merge v2 into v1" PR has been merged to `v1`, the release is complete.

## Keeping the PR checks up to date (admin access required)

Expand Down