-
Notifications
You must be signed in to change notification settings - Fork 356
Update release process to maintain both v2 and v1 releases #995
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
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
2a7a517
Remove unused `repository_dispatch` trigger
henrymercer b386fd4
Parameterize release branch workflow over source and target branches
henrymercer 81827d3
Use the person triggering the release workflow as the conductor
henrymercer ccda44c
Handle missing author information when generating changelog
henrymercer 33f749f
Set up `main -> v2`, `v2 -> v1`, and `v2 -> main` merges
henrymercer d76b182
Add functionality for `v2 -> v1` backports
henrymercer 4b465cb
Dump environment and GitHub context
henrymercer b8f3a37
Fix exception when there are no commits to merge
henrymercer 124e7d9
Stop versioning the runner
henrymercer 5fb01dd
Avoid commits with duplicate names during v2 to v1 backport
henrymercer bd4757c
Update the changelog and version number in a single commit
henrymercer 1668e0a
Only mention merging the mergeback PR in the checklist when relevant
henrymercer 0b037b4
Add merging the v1 release PR to the checklist
henrymercer f143182
Add "Update dependencies" label to v1 release PR
henrymercer 3359990
Avoid conflicts by reverting 1.x version num commit from last v1 release
henrymercer da7944b
Update release process doc
henrymercer 9d26fe0
Use source branch and target branch names consistently
henrymercer bed132d
Use a more restrictive `sed` pattern
henrymercer d0bd808
Expose a more restrictive interface to the release script
henrymercer f784647
Merge branch 'main' into henrymercer/update-release-process
henrymercer 044f112
Update branch protection instructions
henrymercer 839aa81
Merge branch 'main' into henrymercer/update-release-process
henrymercer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,28 @@ | ||
name: Update release branch | ||
on: | ||
repository_dispatch: | ||
# Example of how to trigger this: | ||
# curl -H "Authorization: Bearer <token>" -X POST https://api.github.com/repos/github/codeql-action/dispatches -d '{"event_type":"update-release-branch"}' | ||
# Replace <token> with a personal access token from this page: https://github.com/settings/tokens | ||
types: [update-release-branch] | ||
# You can trigger this workflow via workflow dispatch to start a release. | ||
# This will open a PR to update the v2 release branch. | ||
workflow_dispatch: | ||
|
||
# When the v2 release is complete, this workflow will open a PR to update the v1 release branch. | ||
push: | ||
branches: | ||
- v2 | ||
|
||
jobs: | ||
update: | ||
timeout-minutes: 45 | ||
runs-on: ubuntu-latest | ||
if: ${{ github.repository == 'github/codeql-action' }} | ||
if: github.repository == 'github/codeql-action' | ||
steps: | ||
- name: Dump environment | ||
run: env | ||
|
||
- name: Dump GitHub context | ||
env: | ||
GITHUB_CONTEXT: '${{ toJson(github) }}' | ||
run: echo "$GITHUB_CONTEXT" | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
# Need full history so we calculate diffs | ||
|
@@ -33,5 +43,20 @@ jobs: | |
git config --global user.email "[email protected]" | ||
git config --global user.name "github-actions[bot]" | ||
|
||
- name: Update release branch | ||
run: python .github/update-release-branch.py ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} | ||
- name: Update v2 release branch | ||
if: github.event_name == 'workflow_dispatch' | ||
run: | | ||
python .github/update-release-branch.py \ | ||
--github-token ${{ secrets.GITHUB_TOKEN }} \ | ||
--repository-nwo ${{ github.repository }} \ | ||
--mode release-v2 \ | ||
--conductor ${GITHUB_ACTOR} | ||
|
||
- name: Update v1 release branch | ||
if: github.event_name == 'push' | ||
run: | | ||
python .github/update-release-branch.py \ | ||
--github-token ${{ secrets.GITHUB_TOKEN }} \ | ||
--repository-nwo ${{ github.repository }} \ | ||
--mode release-v1 \ | ||
--conductor ${GITHUB_ACTOR} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.