File tree Expand file tree Collapse file tree 5 files changed +18
-96
lines changed Expand file tree Collapse file tree 5 files changed +18
-96
lines changed Original file line number Diff line number Diff line change 11name : Release
22
33on :
4- pull_request :
5- branches :
6- - main
7- types : [closed]
4+ push :
5+ tags :
6+ - v[0-9]+.[0-9]+.[0-9]+
7+
8+ # Getting an ID token is required for NPMJS trusted publishers
9+ permissions :
10+ id-token : write # Required for OIDC
11+ contents : read
812
913env :
1014 CI : true
1115jobs :
12- release-new-version :
13- if : ${{ github.event.pull_request.merged && startsWith(github.head_ref, 'release/') }}
16+ publish-npm :
1417 runs-on : ubuntu-latest
1518 steps :
1619 - uses : actions/checkout@v5
@@ -19,13 +22,12 @@ jobs:
1922 node-version : 22
2023 cache : npm
2124 registry-url : " https://registry.npmjs.org"
25+ # Ensure npm 11.5.1 or later for trusted publishing
26+ - run : npm install -g npm@latest
2227 - run : npm ci --workspaces
2328 # Running top-level ci should happen after workspaces level, running these
2429 # the other way around results in top-level dependencies (namely, lerna)
2530 # not being installed.
2631 - run : npm ci
2732 - run : npm run build
28- - run : npm run release
29- env :
30- NODE_AUTH_TOKEN : ${{ secrets.INRUPT_NPM_TOKEN }}
31- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
33+ - run : npx lerna publish from-package --yes --no-verify-access
Original file line number Diff line number Diff line change @@ -10,20 +10,8 @@ This repository contains the following:
1010
1111First, decide on what type of release to perform, then:
1212
13- 1 . Run: ` npm run prepare-release `
14-
15- Follow the prompt and select the type of release:
16-
17- - Patch (1.0.1)
18- - Minor (1.1.0)
19- - Major (2.0.0)
20- - Prepatch (1.0.1-alpha.0)
21- - Preminor (1.1.0-alpha.0)
22- - Premajor (2.0.0-alpha.0)
23-
24- After confirming, this will update all the ` package.json ` versions to that new version number,
25- checkout a new branch ` release/<version> ` and commit the changed files.
26-
27- 2 . Push the branch & create a pull request
28-
29- 3 . Merge the pull request, and then let automation do the rest.
13+ 1 . Switch to a new branch
14+ 2 . Run `npm run lerna-version -- <major | minor | patch>, and commit the result
15+ 3 . Push the branch and create a pull request
16+ 4 . Once approved, merge the pull request and create a GH release with the latest version as a tag.
17+ The tag being pushed will trigger CD.
Original file line number Diff line number Diff line change 99 "clean" : " lerna run clean" ,
1010 "release" : " scripts/release.sh" ,
1111 "test:e2e:browser" : " playwright test" ,
12- "prepare-release " : " scripts/prepare-release.sh " ,
12+ "lerna-version " : " lerna version --no-push --no-git-tag-version " ,
1313 "lint" : " npm run lint:check" ,
1414 "lint:check" : " npm run lint:eslint" ,
1515 "lint:fix" : " npm run lint:eslint -- --fix" ,
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments