File tree Expand file tree Collapse file tree 4 files changed +72
-1
lines changed Expand file tree Collapse file tree 4 files changed +72
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Release
2+ on :
3+ workflow_run :
4+ workflows : ["Unit tests"]
5+ types :
6+ - completed
7+ jobs :
8+ release :
9+ name : Release (${{ github.event.workflow_run.head_commit.id }})
10+ if : ${{ github.ref_name == 'main' && github.event.workflow_run.conclusion == 'success' }}
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v3
15+ with :
16+ fetch-depth : 0
17+ - name : Setup Node.js
18+ uses : actions/setup-node@v3
19+ with :
20+ node-version : " lts/*"
21+ registry-url : ' https://registry.npmjs.org'
22+ - name : Install package dependencies
23+ run : yarn install
24+ - name : Build package
25+ run : yarn run build
26+ - name : Install semantic release extras
27+ run : yarn add -D @semantic-release/changelog @semantic-release/git conventional-changelog-conventionalcommits
28+ - name : Semantic Release
29+ id : semantic
30+ uses : cycjimmy/semantic-release-action@v3
31+ env :
32+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
33+ - name : Publish
34+ run : yarn publish
35+ env :
36+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
37+ if : steps.semantic.outputs.new_release_published == 'true'
Original file line number Diff line number Diff line change @@ -4,3 +4,4 @@ node_modules
44dist
55coverage
66yarn.lock
7+ ! release.config.js
Original file line number Diff line number Diff line change 1717 " pulumi"
1818 ],
1919 "author" : " Mathew Topper <damm_horse@yahoo.co.uk>" ,
20- "version" : " 0.1.0 " ,
20+ "version" : " 0.0.0-semantic-release " ,
2121 "main" : " dist/index.js" ,
2222 "types" : " dist/index.d.ts" ,
2323 "bin" : {
Original file line number Diff line number Diff line change 1+ module . exports = {
2+ branches : [ 'main' ] ,
3+ plugins : [
4+ [
5+ '@semantic-release/commit-analyzer' ,
6+ {
7+ preset : 'conventionalcommits' ,
8+ } ,
9+ ] ,
10+ '@semantic-release/release-notes-generator' ,
11+ [
12+ '@semantic-release/changelog' ,
13+ {
14+ changelogFile : 'CHANGELOG.md' ,
15+ } ,
16+ ] ,
17+ [
18+ '@semantic-release/npm' ,
19+ {
20+ npmPublish : false ,
21+ } ,
22+ ] ,
23+ '@semantic-release/github' ,
24+ [
25+ '@semantic-release/git' ,
26+ {
27+ assets : [ 'CHANGELOG.md' ] ,
28+ message :
29+ 'chore(release): set `package.json` to ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}' ,
30+ } ,
31+ ] ,
32+ ] ,
33+ }
You can’t perform that action at this time.
0 commit comments