File tree Expand file tree Collapse file tree 7 files changed +11777
-107
lines changed Expand file tree Collapse file tree 7 files changed +11777
-107
lines changed Original file line number Diff line number Diff line change 11name : publish
22
33on :
4- release :
5- types : [released]
4+ push :
5+ tags :
6+ - " v*.*.*"
67
78jobs :
8- build :
9+ npm-publish-and-gh-release :
910 runs-on : ubuntu-latest
1011 steps :
1112 - uses : actions/checkout@v3
1213 - uses : actions/setup-node@v3
1314 with :
14- node-version : 16
15- - run : npm ci
16- - run : npm test
17-
18- publish-npm :
19- needs : build
20- runs-on : ubuntu-latest
21- steps :
22- - uses : actions/checkout@v3
23- - uses : actions/setup-node@v3
24- with :
25- node-version : 16
15+ node-version : 18
2616 registry-url : https://registry.npmjs.org/
2717 - run : npm ci
18+ - run : npm test
2819 - run : npm publish
2920 env :
3021 NODE_AUTH_TOKEN : ${{secrets.npm_token}}
22+ - uses : softprops/action-gh-release@v1
23+ with :
24+ generate_release_notes : true
25+ token : ${{ secrets.GH_TOKEN }}
3126
Original file line number Diff line number Diff line change 11node_modules /
22.vscode
3+ .npmrc
Original file line number Diff line number Diff line change 1+ {
2+ "npm" : {
3+ "publish" : false
4+ },
5+ "git" : {
6+ "commitMessage" : " chore: release v${version}" ,
7+ "push" : false
8+ },
9+ "github" :{
10+ "release" : false
11+ },
12+ "plugins" : {
13+ "@release-it/conventional-changelog" : {
14+ "preset" : " conventionalcommits" ,
15+ "infile" : " CHANGELOG.md" ,
16+ "ignoreRecommendedBump" : true
17+ }
18+ }
19+ }
Original file line number Diff line number Diff line change 1616- [ Tests] ( #tests )
1717- [ Contributing] ( #contributing )
1818- [ License] ( #license )
19+ - [ Release] ( #release )
1920
2021# Introduction
2122
@@ -97,3 +98,7 @@ Please read the [contribution guidelines](https://github.com/IBM/nodejs-itoolkit
9798
9899# License
99100[ MIT] ( https://github.com/IBM/nodejs-itoolkit/blob/master/LICENSE )
101+
102+ # Release
103+
104+ For information on making a release, read [ RELEASE.md] ( docs/RELEASE.md ) .
Original file line number Diff line number Diff line change 1+ # Release
2+
3+ To create a new release the developer first needs to run:
4+
5+ ``` sh
6+ npm run release
7+ ```
8+
9+ This script will run [ release-it] ( https://github.com/release-it/release-it ) which will then prompt the user for the:
10+
11+ 1 ) version
12+ 2 ) commit message
13+ 3 ) tag name (NOTE: Tag name should follow the pattern v* .* .* )
14+
15+ release-it should then:
16+
17+ - bump the version in the package.json and package-lock.json files
18+ - update CHANGELOG.md
19+ - make the release commit
20+ - create the tag
21+
22+ From there the developer needs to:
23+
24+ 1 ) Review the changes made by release-it are as expected.
25+ 2 ) Push the commit and tag to the main branch (requires proper authority)
26+
27+ ``` sh
28+ git push --follow-tags origin master
29+ ```
30+
31+ Once the tag and commit is pushed to the main branch our [ github action] ( ../.github/workflows/publish.yml ) will:
32+
33+ 1 ) Create the GH release
34+ 2 ) Publish the release to NPM
You can’t perform that action at this time.
0 commit comments