Skip to content

Commit acd9964

Browse files
authored
Merge pull request #701 from github/henrymercer/brief-releasing-instructions
Add brief instructions on creating a release
2 parents 962925a + bc33041 commit acd9964

3 files changed

Lines changed: 24 additions & 4 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,19 @@ jobs:
4646
CODEQL_VERSION_LATEST="$("$CODEQL_LATEST" version --format terse)"
4747
echo "Default CodeQL bundle version is $CODEQL_VERSION_DEFAULT"
4848
echo "Latest CodeQL bundle version is $CODEQL_VERSION_LATEST"
49-
if [[ "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LATEST" ]]; then
50-
# Just use `tools: null` to avoid duplication in the analysis job.
49+
50+
# If we're running on a pull request, run with both bundles, even if `tools: latest` would
51+
# be the same as `tools: null`. This allows us to make the job for each of the bundles a
52+
# required status check.
53+
#
54+
# If we're running on push, then we can skip running with `tools: latest` when it would be
55+
# the same as running with `tools: null`.
56+
if [[ "$GITHUB_EVENT_NAME" != "pull_request" && "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LATEST" ]]; then
5157
VERSIONS_JSON='[null]'
5258
else
53-
# Use both `tools: null` and `tools: latest` in the analysis job.
5459
VERSIONS_JSON='[null, "latest"]'
5560
fi
61+
5662
# Output a JSON-encoded list with the distinct versions to test against.
5763
echo "Suggested matrix config for analysis job: $VERSIONS_JSON"
5864
echo "::set-output name=versions::${VERSIONS_JSON}"

.github/workflows/pr-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ jobs:
357357
#
358358
# If we're running on push, then we can skip running with `tools: latest` when it would be
359359
# the same as running with `tools: null`.
360-
if [[ "$GITHUB_EVENT_NAME" == "pull_request" && "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LATEST" ]]; then
360+
if [[ "$GITHUB_EVENT_NAME" != "pull_request" && "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LATEST" ]]; then
361361
VERSIONS_JSON="[null, \"$NIGHTLY_URL\"]"
362362
else
363363
VERSIONS_JSON="[null, \"$NIGHTLY_URL\", \"latest\"]"

CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,20 @@ Here are a few things you can do that will increase the likelihood of your pull
5858
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
5959
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
6060

61+
## Releasing (write access required)
62+
63+
1. The first step of releasing a new version of the `codeql-action` is running the "Update release branch" workflow.
64+
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.
65+
66+
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).
67+
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.
68+
1. Review the checklist items in the pull request description.
69+
Once you've checked off all but the last of these, approve the PR and automerge it.
70+
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.
71+
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.
72+
73+
Approve the mergeback PR and automerge it. Once the mergeback has been merged into main, the release is complete.
74+
6175
## Resources
6276

6377
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)

0 commit comments

Comments
 (0)