File tree Expand file tree Collapse file tree 6 files changed +95
-33
lines changed
Expand file tree Collapse file tree 6 files changed +95
-33
lines changed Original file line number Diff line number Diff line change 1+ name : Publish to GitHub Packages
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ publish :
9+ runs-on : ubuntu-latest
10+ permissions :
11+ contents : read
12+ packages : write
13+ steps :
14+ - uses : actions/checkout@v4
15+
16+ - name : Generate token from NOMBOT
17+ id : generate_token
18+ uses : actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
19+ with :
20+ app-id : ${{ secrets.NOMBOT_APP_ID }}
21+ private-key : ${{ secrets.NOMBOT_PRIVATE_KEY }}
22+
23+ - name : Setup Node.js
24+ uses : actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
25+ with :
26+ node-version : ' 18'
27+ registry-url : ' https://npm.pkg.github.com'
28+ scope : ' @nominal'
29+
30+ - name : Install dependencies
31+ run : npm ci
32+
33+ - name : Build
34+ run : npm run compile
35+
36+ - name : Run tests
37+ run : npm test
38+ env :
39+ MOCHA_THROW_DEPRECATION : false
40+
41+ - name : Publish to GitHub Packages
42+ run : npm publish
43+ env :
44+ NODE_AUTH_TOKEN : ${{ steps.generate_token.outputs.token }}
Original file line number Diff line number Diff line change 1+ name : Release Please
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ permissions :
9+ contents : write
10+ pull-requests : write
11+
12+ jobs :
13+ release-please :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Generate token from NOMBOT
17+ id : generate_token
18+ uses : actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
19+ with :
20+ app-id : ${{ secrets.NOMBOT_APP_ID }}
21+ private-key : ${{ secrets.NOMBOT_PRIVATE_KEY }}
22+
23+ - uses : googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4.1.3
24+ with :
25+ token : ${{ steps.generate_token.outputs.token }}
26+
Original file line number Diff line number Diff line change 11{
2- "name" : " release-please" ,
2+ "name" : " @nominal/ release-please" ,
33 "version" : " 17.1.3" ,
44 "description" : " generate release PRs based on the conventionalcommits.org spec" ,
55 "main" : " ./build/src/index.js" ,
2121 " !build/src/**/*.map" ,
2222 " schemas"
2323 ],
24- "repository" : " googleapis/release-please" ,
24+ "repository" : " nominal/release-please" ,
25+ "publishConfig" : {
26+ "registry" : " https://npm.pkg.github.com"
27+ },
2528 "keywords" : [
2629 " release" ,
2730 " conventional-commits"
2831 ],
2932 "author" : " Google Inc." ,
3033 "license" : " Apache-2.0" ,
3134 "bugs" : {
32- "url" : " https://github.com/googleapis /release-please/issues"
35+ "url" : " https://github.com/nominal /release-please/issues"
3336 },
34- "homepage" : " https://github.com/googleapis /release-please#readme" ,
37+ "homepage" : " https://github.com/nominal /release-please#readme" ,
3538 "config" : {
3639 "snap-shot-it" : {
3740 "sortSnapshots" : true
Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ export class LinkedVersions extends ManifestPlugin {
178178 this . targetBranch ,
179179 this . repositoryConfig ,
180180 {
181- pullRequestTitlePattern : `chore\${scope}: release ${ this . groupName } libraries ` ,
181+ pullRequestTitlePattern : `chore\${scope}: release ${ this . groupName } \${version} ` ,
182182 forceMerge : true ,
183183 headBranchName : BranchName . ofGroupTargetBranch (
184184 this . groupName ,
Original file line number Diff line number Diff line change @@ -104,11 +104,25 @@ export class Merge extends ManifestPlugin {
104104 }
105105 const updates = mergeUpdates ( rawUpdates ) ;
106106
107+ // Use rootRelease version if available, otherwise fall back to the first candidate's version
108+ // only if there's no rootRelease AND all candidates have the same version (linked-versions case)
109+ let version = rootRelease ?. pullRequest . title . version ;
110+ if ( ! version && inScopeCandidates . length > 0 ) {
111+ const firstVersion = inScopeCandidates [ 0 ] ?. pullRequest . version ;
112+ const allSameVersion = inScopeCandidates . every (
113+ candidate =>
114+ candidate . pullRequest . version ?. toString ( ) === firstVersion ?. toString ( )
115+ ) ;
116+ if ( allSameVersion ) {
117+ version = firstVersion ;
118+ }
119+ }
120+
107121 const pullRequest = {
108122 title : PullRequestTitle . ofComponentTargetBranchVersion (
109123 rootRelease ?. pullRequest . title . component ,
110124 this . targetBranch ,
111- rootRelease ?. pullRequest . title . version ,
125+ version ,
112126 this . pullRequestTitlePattern ,
113127 this . componentNoSpace
114128 ) ,
You can’t perform that action at this time.
0 commit comments