55 branches :
66 - main
77 - master
8- pull_request :
9- types : [closed]
10- branches :
11- - main
12- - master
13- # Runs the release again by hand, for a release that failed after its commits landed: a
14- # re-run reads the workflow of the failed commit, and a push releases only when its own
15- # message starts with feat:, fix: or perf:. With dry_run, the dry-run job below runs
16- # instead, on any branch.
8+ # Runs a release by hand: after a merged pull request, whose push is a merge commit and starts
9+ # no release, and for a release that failed after its commits landed (a re-run reads the
10+ # workflow of the failed commit). A run that failed after it pushed its tag needs the steps in
11+ # docs/deployment.md first. With dry_run, the dry-run job below runs instead, on any branch.
1712 workflow_dispatch :
1813 inputs :
1914 dry_run :
@@ -28,14 +23,10 @@ permissions:
2823 id-token : write
2924 packages : write
3025
31- # A merged pull request starts two runs here, the push to master and the pull_request closed
32- # event (whose ref is master), and with cancel-in-progress one cancelled the other: after #49
33- # and #41 the closed runs 39502528638 and 17751756261 were cancelled. Were the push run
34- # cancelled instead, the release would not run: semantic-release publishes nothing from a
35- # pull_request event. A publishing workflow never cancels, and every run of this one waits in
36- # one fixed group, whatever its branch or event. queue: max keeps up to 100 runs waiting; with
37- # the default (queue: single) a newer run, even a push whose job is skipped, replaces the one
38- # waiting, so a waiting manual run would be dropped.
26+ # A publishing workflow never cancels, and every run of this one waits in one fixed group,
27+ # whatever its branch or event. queue: max keeps up to 100 runs waiting; with the default
28+ # (queue: single) a newer run, even a push whose job is skipped, replaces the one waiting, so a
29+ # waiting manual run would be dropped.
3930concurrency :
4031 group : semantic-release
4132 cancel-in-progress : false
4536 release :
4637 name : Release
4738 runs-on : ubuntu-latest
48- # Skip for commits that don't need releases. A manual run releases master or main only, the
39+ # Skip for commits that don't need releases. Revert " is the message git revert writes, which
40+ # the commit analyzer releases as a patch. contains() ignores case, so the footer is matched
41+ # with its colon: without it, any message that mentions a breaking change in its prose
42+ # started the release job. A manual run releases master or main only, the
4943 # branches .releaserc names, and only without dry_run: semantic-release refuses any other
5044 # branch, after the suite and the build have run.
5145 if : |
@@ -60,20 +54,26 @@ jobs:
6054 !startsWith(github.event.head_commit.message, 'ci:') &&
6155 !startsWith(github.event.head_commit.message, 'build:') &&
6256 (startsWith(github.event.head_commit.message, 'feat:') ||
57+ startsWith(github.event.head_commit.message, 'feat(') ||
6358 startsWith(github.event.head_commit.message, 'fix:') ||
59+ startsWith(github.event.head_commit.message, 'fix(') ||
6460 startsWith(github.event.head_commit.message, 'perf:') ||
65- contains(github.event.head_commit.message, 'BREAKING CHANGE'))) ||
66- (github.event_name == 'pull_request' &&
67- github.event.pull_request.merged == true &&
68- !contains(github.event.pull_request.labels.*.name, 'skip-release')) ||
61+ startsWith(github.event.head_commit.message, 'perf(') ||
62+ startsWith(github.event.head_commit.message, 'revert:') ||
63+ startsWith(github.event.head_commit.message, 'revert(') ||
64+ startsWith(github.event.head_commit.message, 'Revert "') ||
65+ contains(github.event.head_commit.message, 'BREAKING CHANGE:'))) ||
6966 (github.event_name == 'workflow_dispatch' && !inputs.dry_run &&
7067 (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'))
7168 timeout-minutes : 45
69+ # Nothing is committed to master: .releaserc has no @semantic-release/git, so a release is a
70+ # tag, an npm version and a GitHub Release, and master's ruleset (required checks, no bypass)
71+ # never meets a push from this job. package.json's version on master is not the released
72+ # version; the highest v* tag is.
73+ #
7274 # Git hooks are for commits made by hand. pnpm install installs them here (prepare: husky),
73- # and @semantic-release/git commits and pushes with hooks on: run 39541215457 stopped when
74- # commit-msg's commitlint rejected the release notes' long lines, and pre-push would run
75- # the typecheck and the whole suite again. husky 9 skips its install and every hook when
76- # HUSKY is 0.
75+ # and semantic-release pushes its tag with hooks on: pre-push would run the typecheck and the
76+ # whole suite again. husky 9 skips its install and every hook when HUSKY is 0.
7777 env :
7878 HUSKY : ' 0'
7979
@@ -141,7 +141,7 @@ jobs:
141141 NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
142142 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
143143 # The steps above ran the lint, the suite, the build and the packed-files check on this
144- # commit. semantic-release pushes the release commit and the tag before its publish step
144+ # commit. semantic-release pushes the tag before its publish step
145145 # (semantic-release 21.1.2 index.js lines 205 to 212), and npm publish would then run
146146 # prepublishOnly: the suite again with parallel workers (CI runs it only with
147147 # --runInBand), the lint, the build and the size script. A red second run
0 commit comments