Skip to content

Commit 72890b7

Browse files
committed
feat(semantic-release): set up Semantic-Release for auto Release & Update
Setup Semantic-Release with Commitizen - along with GitHub Workflow. Now this setup will - - Auto Release on GitHub, NPM - Update Changelog automatically from Conventional Commit messages and update version in package.json - Set up Commitizen for Conventional Commit message formatting - Setup GitHub Workflow to automate all these tasks fix #1
1 parent 39fdbb6 commit 72890b7

File tree

7 files changed

+14862
-2782
lines changed

7 files changed

+14862
-2782
lines changed

.czrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"path": "cz-conventional-changelog"
3+
}

.github/workflows/publish.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
12+
permissions:
13+
contents: write
14+
issues: write
15+
pull-requests: write
16+
id-token: write
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v3
21+
22+
- name: Use NodeJS 22
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: 22.13.1
26+
27+
- name: Set up Bun
28+
uses: oven-sh/setup-bun@v1
29+
with:
30+
bun-version: 1.1.17
31+
32+
- name: Install dependencies via Node
33+
run: npm install
34+
35+
- name: Install dependencies via Bun
36+
run: bun install
37+
38+
- name: Release
39+
env:
40+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
run: bun run release

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

22
src/
3-
tsconfig.json
3+
tsconfig*.json
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{{#if scope}} **{{scope}}:**
2+
{{~/if}} {{#if subject}}
3+
{{~subject}}
4+
{{~else}}
5+
{{~header}}
6+
{{~/if}}
7+
8+
{{~!-- commit link --}} {{#if @root.linkReferences~}}
9+
([{{shortHash}}](
10+
{{~#if @root.repository}}
11+
{{~#if @root.host}}
12+
{{~@root.host}}/
13+
{{~/if}}
14+
{{~#if @root.owner}}
15+
{{~@root.owner}}/
16+
{{~/if}}
17+
{{~@root.repository}}
18+
{{~else}}
19+
{{~@root.repoUrl}}
20+
{{~/if}}/
21+
{{~@root.commit}}/{{hash}}))
22+
{{~else}}
23+
{{~shortHash}}
24+
{{~/if}}
25+
26+
{{~!-- commit references --}}
27+
{{~#if references~}}
28+
, closes
29+
{{~#each references}} {{#if @root.linkReferences~}}
30+
[
31+
{{~#if this.owner}}
32+
{{~this.owner}}/
33+
{{~/if}}
34+
{{~this.repository}}#{{this.issue}}](
35+
{{~#if @root.repository}}
36+
{{~#if @root.host}}
37+
{{~@root.host}}/
38+
{{~/if}}
39+
{{~#if this.repository}}
40+
{{~#if this.owner}}
41+
{{~this.owner}}/
42+
{{~/if}}
43+
{{~this.repository}}
44+
{{~else}}
45+
{{~#if @root.owner}}
46+
{{~@root.owner}}/
47+
{{~/if}}
48+
{{~@root.repository}}
49+
{{~/if}}
50+
{{~else}}
51+
{{~@root.repoUrl}}
52+
{{~/if}}/
53+
{{~@root.issue}}/{{this.issue}})
54+
{{~else}}
55+
{{~#if this.owner}}
56+
{{~this.owner}}/
57+
{{~/if}}
58+
{{~this.repository}}#{{this.issue}}
59+
{{~/if}}{{/each}}
60+
{{~/if}}
61+
62+
{{~#if body}}
63+
{{{{raw}}}}
64+
65+
{{{{/raw}}}}
66+
67+
{{body}} <br/><br/>
68+
69+
{{~/if}}
70+
71+
{{{{raw}}}}
72+
73+
{{{{/raw}}}}

0 commit comments

Comments
 (0)