Draft: refactor: update release Makefile, do not create tag, use release branch
Background
This MR updates the release makefile and semantic-release:
- uses a new branch
semantic-release-candidate
to avoid pushing tomain
- does not create tags
The end result is still more manual than I want, but it's a step in the right direction of automating a part of the release process.
The PROCESS.md
file was also updated with instructions on what to do
How to test
I tested this by running a few things locally
Testing the new makefile
make release-prep
Testing the semantic release piece:
Run in semantic-release in dry run mode. Running the makefile doesn't quite work because these changes don't exist in the main
or semantic-release-candidate
branch.
npx semantic-release --no-ci --dry-run
output
➜ npx semantic-release --no-ci --dry-run
[3:44:34 PM] [semantic-release] › ℹ Running semantic-release version 24.1.2
[3:44:34 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/changelog"
[3:44:34 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/exec"
[3:44:34 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/git"
[3:44:34 PM] [semantic-release] › ✔ Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[3:44:34 PM] [semantic-release] › ✔ Loaded plugin "analyzeCommits" from "@semantic-release/exec"
[3:44:34 PM] [semantic-release] › ✔ Loaded plugin "verifyRelease" from "@semantic-release/exec"
[3:44:34 PM] [semantic-release] › ✔ Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[3:44:34 PM] [semantic-release] › ✔ Loaded plugin "generateNotes" from "@semantic-release/exec"
[3:44:34 PM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/changelog"
[3:44:34 PM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/exec"
[3:44:34 PM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/git"
[3:44:34 PM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/exec"
[3:44:34 PM] [semantic-release] › ✔ Loaded plugin "addChannel" from "@semantic-release/exec"
[3:44:34 PM] [semantic-release] › ✔ Loaded plugin "success" from "@semantic-release/exec"
[3:44:34 PM] [semantic-release] › ✔ Loaded plugin "fail" from "@semantic-release/exec"
[3:44:37 PM] [semantic-release] › ⚠ Run automated release from branch tchu-update-release on repository git@gitlab.com:gitlab-org/gitlab-elasticsearch-indexer.git in dry-run mode
[3:44:38 PM] [semantic-release] › ✔ Allowed to push to the Git repository
[3:44:38 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/changelog"
[3:44:38 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/changelog"
[3:44:38 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/exec"
[3:44:38 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/exec"
[3:44:38 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/git"
[3:44:38 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/git"
[3:44:38 PM] [semantic-release] › ℹ Found git tag v5.4.0 associated with version 5.4.0 on branch tchu-update-release
[3:44:38 PM] [semantic-release] › ℹ Found 28 commits since last release
[3:44:38 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: refactor: update release Makefile, do not create tag, use release branch
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is patch
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'renovate/github.com-go-enry-go-enry-v2-2.x' into 'main'
chore(deps): update module github.com/go-enry/go-enry/v2 to v2.9.2
See merge request https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/-/merge_requests/567
Merged-by: Terri Chu <tchu@gitlab.com>
Approved-by: Terri Chu <tchu@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore(deps): update module github.com/go-enry/go-enry/v2 to v2.9.2
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'renovate/golang.org-x-net-0.x' into 'main'
chore(deps): update module golang.org/x/net to v0.34.0
See merge request https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/-/merge_requests/563
Merged-by: John Mason <9717668-johnmason@users.noreply.gitlab.com>
Approved-by: John Mason <9717668-johnmason@users.noreply.gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore(deps): update module golang.org/x/net to v0.34.0
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'renovate/golang.org-x-net-0.x' into 'main'
chore(deps): update module golang.org/x/net to v0.31.0
See merge request https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/-/merge_requests/544
Merged-by: John Mason <9717668-johnmason@users.noreply.gitlab.com>
Approved-by: John Mason <9717668-johnmason@users.noreply.gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'renovate/github.com-aws-aws-sdk-go-1.x' into 'main'
chore(deps): update module github.com/aws/aws-sdk-go to v1.55.6
See merge request https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/-/merge_requests/560
Merged-by: John Mason <9717668-johnmason@users.noreply.gitlab.com>
Approved-by: John Mason <9717668-johnmason@users.noreply.gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'renovate/node-22.x' into 'main'
chore(deps): update dependency node to v22.13.1
See merge request https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/-/merge_requests/562
Merged-by: John Mason <9717668-johnmason@users.noreply.gitlab.com>
Approved-by: John Mason <9717668-johnmason@users.noreply.gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore(deps): update dependency node to v22.13.1
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore(deps): update module github.com/aws/aws-sdk-go to v1.55.6
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'renovate/node-22.x' into 'main'
chore(deps): update dependency node to v22.13.0
See merge request https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/-/merge_requests/558
Merged-by: Terri Chu <tchu@gitlab.com>
Approved-by: Terri Chu <tchu@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore(deps): update dependency node to v22.13.0
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'renovate/golang-1.x' into 'main'
chore(deps): update dependency golang to v1.23.4
See merge request https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/-/merge_requests/550
Merged-by: John Mason <9717668-johnmason@users.noreply.gitlab.com>
Approved-by: John Mason <9717668-johnmason@users.noreply.gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'renovate/danger-review-2.x' into 'main'
chore(deps): update dependency danger-review to v2
See merge request https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/-/merge_requests/552
Merged-by: Dylan Griffith <dyl.griffith@gmail.com>
Approved-by: Peter Leitzen <pleitzen@gitlab.com>
Approved-by: Dylan Griffith <dyl.griffith@gmail.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore(deps): update dependency danger-review to v2
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore(deps): update dependency golang to v1.23.4
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'renovate/node-22.x' into 'main'
chore(deps): update dependency node to v22.12.0
See merge request https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/-/merge_requests/551
Merged-by: Dmitry Gruzd <dgruzd@gitlab.com>
Approved-by: Dmitry Gruzd <dgruzd@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore(deps): update dependency node to v22.12.0
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'renovate/github.com-stretchr-testify-1.x' into 'main'
chore(deps): update module github.com/stretchr/testify to v1.10.0
See merge request https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/-/merge_requests/547
Merged-by: Dylan Griffith <dyl.griffith@gmail.com>
Approved-by: Dylan Griffith <dyl.griffith@gmail.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore(deps): update module github.com/stretchr/testify to v1.10.0
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'tchu-update-release-docs-tags-warning' into 'main'
Update release process tag warning
See merge request https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/-/merge_requests/546
Merged-by: Dylan Griffith <dyl.griffith@gmail.com>
Approved-by: Dylan Griffith <dyl.griffith@gmail.com>
Co-authored-by: Terri Chu <tchu@gitlab.com>
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore: update release process tag warning
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore(deps): update module golang.org/x/net to v0.31.0
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'update-CONTRIBUTING.md-LICENSE.md' into 'main'
Update CONTRIBUTING.md and LICENSE.md
See merge request https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/-/merge_requests/540
Merged-by: John Mason <9717668-johnmason@users.noreply.gitlab.com>
Approved-by: John Mason <9717668-johnmason@users.noreply.gitlab.com>
Co-authored-by: Lin Jen-Shin <jen-shin@gitlab.com>
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'move-package-to-its-own-stage' into 'main'
Move package job to its own stage
See merge request https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/-/merge_requests/539
Merged-by: Terri Chu <tchu@gitlab.com>
Approved-by: Arturo Herrero <arturo.herrero@gmail.com>
Approved-by: Terri Chu <tchu@gitlab.com>
Co-authored-by: Dmitry Gruzd <dgruzd@gitlab.com>
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore(license): update LICENSE.md to replace `GitLab B.V.` with `GitLab Inc.`
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore(license): update CONTRIBUTING.md to replace `GitLab B.V.` with `GitLab Inc.`
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: ci: move package job to its own stage
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is patch
[3:44:38 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analysis of 28 commits complete: minor release
[3:44:38 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[3:44:38 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "@semantic-release/exec"
[3:44:38 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "@semantic-release/exec"
[3:44:38 PM] [semantic-release] › ℹ The next release version is 5.5.0
[3:44:38 PM] [semantic-release] › ℹ Start step "verifyRelease" of plugin "@semantic-release/exec"
[3:44:38 PM] [semantic-release] › ✔ Completed step "verifyRelease" of plugin "@semantic-release/exec"
[3:44:38 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[3:44:38 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[3:44:38 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "@semantic-release/exec"
[3:44:38 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "@semantic-release/exec"
[3:44:38 PM] [semantic-release] › ⚠ Skip step "prepare" of plugin "@semantic-release/changelog" in dry-run mode
[3:44:38 PM] [semantic-release] › ⚠ Skip step "prepare" of plugin "@semantic-release/exec" in dry-run mode
[3:44:38 PM] [semantic-release] › ⚠ Skip step "prepare" of plugin "@semantic-release/git" in dry-run mode
[3:44:38 PM] [semantic-release] › ⚠ Skip v5.5.0 tag creation in dry-run mode
[3:44:38 PM] [semantic-release] › ⚠ Skip step "publish" of plugin "@semantic-release/exec" in dry-run mode
[3:44:38 PM] [semantic-release] › ⚠ Skip step "success" of plugin "@semantic-release/exec" in dry-run mode
[3:44:38 PM] [semantic-release] › ✔ Published release 5.5.0 on default channel
[3:44:38 PM] [semantic-release] › ℹ Release note for version 5.5.0:
## 5.5.0 (2025-02-07)
### Chores
* deps: update dependency danger-review to v2 (81fa478)
* deps: update dependency golang to v1.23.4 (093c130)
* deps: update dependency node to v22.12.0 (c3a4cac)
* deps: update dependency node to v22.13.0 (e4fc5e5)
* deps: update dependency node to v22.13.1 (18a3120)
* deps: update module github.com/aws/aws-sdk-go to v1.55.6 (5a154bd)
* deps: update module github.com/go-enry/go-enry/v2 to v2.9.2 (eb5d79c)
* deps: update module github.com/stretchr/testify to v1.10.0 (31db711)
* deps: update module golang.org/x/net to v0.31.0 (27f4cb1)
* deps: update module golang.org/x/net to v0.34.0 (fee4b66)
* license: update CONTRIBUTING.md to replace GitLab B.V. with GitLab Inc. (71b3ef2)
* license: update LICENSE.md to replace GitLab B.V. with GitLab Inc. (700f2c6)
* update release process tag warning (42ffb24)
### Code Refactoring
* update release Makefile, do not create tag, use release branch (30847fe)
### Continuous Integration
* move package job to its own stage (f32785b)
Merge request reports
Activity
assigned to @terrichu
added 1 commit
- 714957be - refactor: update release Makefile, do not create tag, use release branch
Reviewer roulette
Changes that require review have been detected! A merge request is normally reviewed by both a reviewer and a maintainer in its primary category and by a maintainer in all other categories.
To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, mention them as you normally would! Danger does not automatically notify them for you.
Reviewer Maintainer @arturoherrero
(UTC+1, 6 hours ahead of author)
@DylanGriffith
(UTC+11, 16 hours ahead of author)
Generated by
Dangeradded 1 commit
- 30847fee - refactor: update release Makefile, do not create tag, use release branch
added groupglobal search maintenancerelease typemaintenance labels
added devopsfoundations sectioncore platform labels
changed milestone to %17.9
requested review from @dgruzd
added 1 commit
- feed2c89 - refactor: update release Makefile, do not create tag, use release branch
removed review request for @dgruzd
81 81 release-prep: 82 82 @git checkout main 83 83 @git pull origin main 84 @git checkout -B semantic-release-candidate origin/semantic-release-candidate || git checkout -b semantic-release-candidate 85 @git merge main --no-edit 86 @git push origin semantic-release-candidate 84 87 85 88 release-dry-run: release-prep 86 89 @npx semantic-release --no-ci --dry-run 87 90 88 91 release: release-prep 89 @echo "This will generate and push a changelog update and a new tag, are you sure? [y/N] " && read ans && [ $${ans:-N} = y ] 92 @echo -e "This will generate and push a CHANGELOG and VERSION update to the `semantic-release-candidate` branch. An MR must be opened to merge into `main` to complete the release process.\nAre you sure? [y/N] " && read ans && [ $${ans:-N} = y ] suggestion: I think there might be an issue with backticks. By default, shell executes whatever is inside the backticks. Should we escape these?
❯ echo -e "This will generate and push a CHANGELOG and VERSION update to the `semantic-release-candidate` branch. An MR must be opened to merge into `main` to complete the release process.\nAre you sure? [y/N] " && read ans && [ $${ans:-N} = y ] zsh: command not found: semantic-release-candidate zsh: command not found: main This will generate and push a CHANGELOG and VERSION update to the branch. An MR must be opened to merge into to complete the release process. Are you sure? [y/N] y
92 @echo -e "This will generate and push a CHANGELOG and VERSION update to the `semantic-release-candidate` branch. An MR must be opened to merge into `main` to complete the release process.\nAre you sure? [y/N] " && read ans && [ $${ans:-N} = y ] 92 @echo -e "This will generate and push a CHANGELOG and VERSION update to the \`semantic-release-candidate\` branch. An MR must be opened to merge into \`main\` to complete the release process.\nAre you sure? [y/N] " && read ans && [ $${ans:-N} = y ]