Skip to content

Commit 03cb54a

Browse files
committed
chore: update semantic-release workflow and config
1 parent 2de0c7e commit 03cb54a

2 files changed

Lines changed: 166 additions & 176 deletions

File tree

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
branches:
88
- main
99
- master
10+
- next
1011

1112
env:
1213
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -37,17 +38,16 @@ jobs:
3738
- name: Install dependencies
3839
run: |
3940
sudo apt-get update
40-
npm install -g pnpm
4141
npm install -g typescript
4242
- name: Build
4343
id: app_build
4444
run: |
45-
pnpm install
46-
pnpm run build:lib
47-
- uses: actions/upload-artifact@v3
45+
npm install
46+
npm run build
47+
- uses: actions/upload-artifact@v4
4848
with:
4949
name: production-files
50-
path: "${{ join(fromJSON(steps.app_build.outputs.artifacts), '\n') }}"
50+
path: dist
5151
deploy:
5252
runs-on: ubuntu-latest
5353
name: Deploy
@@ -60,15 +60,16 @@ jobs:
6060
- name: Create Deploy Directory
6161
run: mkdir -p dist
6262
- name: Download artifact
63-
uses: actions/download-artifact@v2
63+
uses: actions/download-artifact@v4
6464
with:
6565
name: production-files
6666
path: ./dist
6767
- name: Setup node
6868
uses: actions/setup-node@v3
6969
with:
7070
node-version: 18
71-
- run: npm install -g conventional-changelog-conventionalcommits
71+
- name: Install dependencies
72+
run: npm install
7273
- run: npm install -g semantic-release@v19.0.5
7374
- run: npm install -g @semantic-release/exec
7475
- run: npm install -g @semantic-release/git
@@ -79,7 +80,7 @@ jobs:
7980
env:
8081
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8182
#sudo apt-get install -y jq
82-
#chmod +x ./scripts/prepareCMD.sh
83+
#chmod +x ./scripts/prepareCMD.sh
8384
run: |
8485
semantic-release
8586

.releaserc

Lines changed: 157 additions & 168 deletions
Original file line numberDiff line numberDiff line change
@@ -1,177 +1,166 @@
11
{
2-
"branches": [
3-
"main",
4-
"master",
5-
"release",
6-
{
7-
"name": "staging",
8-
"prerelease": true
9-
}
2+
"branches": [
3+
"main",
4+
"master",
5+
"release",
6+
{
7+
"name": "next",
8+
"prerelease": "next"
9+
}
10+
],
11+
"plugins": [
12+
[
13+
"@semantic-release/commit-analyzer",
14+
{
15+
"preset": "angular",
16+
"parserOpts": {
17+
"noteKeywords": [
18+
"BREAKING CHANGE",
19+
"BREAKING CHANGES",
20+
"BREAKING"
21+
]
22+
},
23+
"releaseRules": [
24+
{
25+
"breaking": true,
26+
"release": "major"
27+
},
28+
{
29+
"type": "feat",
30+
"release": "minor"
31+
},
32+
{
33+
"type": "fix",
34+
"release": "patch"
35+
},
36+
{
37+
"type": "perf",
38+
"release": "patch"
39+
},
40+
{
41+
"type": "revert",
42+
"release": "patch"
43+
},
44+
{
45+
"type": "docs",
46+
"scope": "docs-*",
47+
"release": "minor"
48+
},
49+
{
50+
"type": "docs",
51+
"release": false
52+
},
53+
{
54+
"type": "style",
55+
"release": "patch"
56+
},
57+
{
58+
"type": "refactor",
59+
"release": "patch"
60+
},
61+
{
62+
"type": "test",
63+
"release": "patch"
64+
},
65+
{
66+
"type": "build",
67+
"release": "patch"
68+
},
69+
{
70+
"type": "ci",
71+
"scope": "ci-*",
72+
"release": "patch"
73+
},
74+
{
75+
"type": "chore",
76+
"release": false
77+
},
78+
{
79+
"type": "no-release",
80+
"release": false
81+
}
82+
]
83+
}
1084
],
11-
"plugins": [
12-
[
13-
"@semantic-release/commit-analyzer",
85+
[
86+
"@semantic-release/release-notes-generator",
87+
{
88+
"preset": "angular",
89+
"parserOpts": {
90+
"noteKeywords": [
91+
"BREAKING CHANGE",
92+
"BREAKING CHANGES",
93+
"BREAKING"
94+
]
95+
},
96+
"writerOpts": {
97+
"commitsSort": [
98+
"subject",
99+
"scope"
100+
]
101+
},
102+
"presetConfig": {
103+
"types": [
14104
{
15-
"preset": "conventionalcommits",
16-
"parserOpts": {
17-
"noteKeywords": [
18-
"BREAKING CHANGE",
19-
"BREAKING CHANGES",
20-
"BREAKING"
21-
]
22-
},
23-
"releaseRules": [
24-
{
25-
"breaking": true,
26-
"release": "major"
27-
},
28-
{
29-
"type": "feat",
30-
"release": "minor"
31-
},
32-
{
33-
"type": "fix",
34-
"release": "patch"
35-
},
36-
{
37-
"type": "perf",
38-
"release": "patch"
39-
},
40-
{
41-
"type": "revert",
42-
"release": "patch"
43-
},
44-
{
45-
"type": "docs",
46-
"scope": "docs-*",
47-
"release": "minor"
48-
},
49-
{
50-
"type": "docs",
51-
"release": false
52-
},
53-
{
54-
"type": "style",
55-
"release": "patch"
56-
},
57-
{
58-
"type": "refactor",
59-
"release": "patch"
60-
},
61-
{
62-
"type": "test",
63-
"release": "patch"
64-
},
65-
{
66-
"type": "build",
67-
"release": "patch"
68-
},
69-
{
70-
"type": "ci",
71-
"scope": "ci-*",
72-
"release": "patch"
73-
},
74-
{
75-
"type": "chore",
76-
"release": false
77-
},
78-
{
79-
"type": "no-release",
80-
"release": false
81-
}
82-
]
83-
}
84-
],
85-
[
86-
"@semantic-release/release-notes-generator",
105+
"type": "feat",
106+
"section": "🍕 Features"
107+
},
87108
{
88-
"preset": "conventionalcommits",
89-
"parserOpts": {
90-
"noteKeywords": [
91-
"BREAKING CHANGE",
92-
"BREAKING CHANGES",
93-
"BREAKING"
94-
]
95-
},
96-
"writerOpts": {
97-
"commitsSort": [
98-
"subject",
99-
"scope"
100-
]
101-
},
102-
"presetConfig": {
103-
"types": [
104-
{
105-
"type": "feat",
106-
"section": "🍕 Features"
107-
},
108-
{
109-
"type": "feature",
110-
"section": "🍕 Features"
111-
},
112-
{
113-
"type": "fix",
114-
"section": "🐛 Bug Fixes"
115-
},
116-
{
117-
"type": "perf",
118-
"section": "🔥 Performance Improvements"
119-
},
120-
{
121-
"type": "revert",
122-
"section": "⏩ Reverts"
123-
},
124-
{
125-
"type": "docs",
126-
"section": "📝 Documentation"
127-
},
128-
{
129-
"type": "style",
130-
"section": "🎨 Styles"
131-
},
132-
{
133-
"type": "refactor",
134-
"section": "🧑‍💻 Code Refactoring"
135-
},
136-
{
137-
"type": "test",
138-
"section": "✅ Tests"
139-
},
140-
{
141-
"type": "build",
142-
"section": "🤖 Build System"
143-
},
144-
{
145-
"type": "ci",
146-
"section": "🔁 Continuous Integration"
147-
}
148-
]
149-
}
150-
}
151-
],
152-
[
153-
"@semantic-release/changelog",
109+
"type": "fix",
110+
"section": "🐛 Bug Fixes"
111+
},
154112
{
155-
"changelogTitle": "# 📦 Changelog \n[![conventional commits](https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n[![semantic versioning](https://img.shields.io/badge/semantic%20versioning-2.0.0-green.svg)](https://semver.org)\n> All notable changes to this project will be documented in this file"
156-
}
157-
],
158-
[
159-
"@semantic-release/exec",
113+
"type": "perf",
114+
"section": "🔥 Performance Improvements"
115+
},
160116
{
161-
"prepareCmd": "./scripts/prepareCMD.sh ${nextRelease.version}",
162-
"publishCmd": "echo Publishing ${nextRelease.version}"
163-
}
164-
],
165-
[
166-
"@semantic-release/git",
117+
"type": "revert",
118+
"section": "⏩ Reverts"
119+
},
167120
{
168-
"assets": [
169-
"package.json",
170-
"LICENSE*",
171-
"CHANGELOG.md"
172-
],
173-
"message": "chore(${nextRelease.type}): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
121+
"type": "docs",
122+
"section": "📝 Documentation"
123+
},
124+
{
125+
"type": "style",
126+
"section": "🎨 Styles"
127+
},
128+
{
129+
"type": "refactor",
130+
"section": "🧑‍💻 Code Refactoring"
131+
},
132+
{
133+
"type": "test",
134+
"section": "✅ Tests"
135+
},
136+
{
137+
"type": "build",
138+
"section": "🤖 Build System"
139+
},
140+
{
141+
"type": "ci",
142+
"section": "🔁 Continuous Integration"
174143
}
175-
]
144+
]
145+
}
146+
}
147+
],
148+
[
149+
"@semantic-release/changelog",
150+
{
151+
"changelogTitle": "# 📦 Changelog \n[![angular commits](https://img.shields.io/badge/angular%20commits-1.0.0-yellow.svg)](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#commit)\n[![semantic versioning](https://img.shields.io/badge/semantic%20versioning-2.0.0-green.svg)](https://semver.org)\n> All notable changes to this project will be documented in this file"
152+
}
153+
],
154+
[
155+
"@semantic-release/git",
156+
{
157+
"assets": [
158+
"package.json",
159+
"LICENSE*",
160+
"CHANGELOG.md"
161+
],
162+
"message": "chore(${nextRelease.type}): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
163+
}
176164
]
177-
}
165+
]
166+
}

0 commit comments

Comments
 (0)