Skip to content

Commit 2050ea3

Browse files
committed
build: semantic-release
1 parent 1bfcafa commit 2050ea3

6 files changed

Lines changed: 3541 additions & 119 deletions

File tree

.github/workflows/develop.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 7 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
name: Release
1+
name: Semantic Release
22

33
on:
44
push:
5-
branches: [master]
5+
branches: [master, develop, feat/*, fix/*]
66
jobs:
77
build:
88
runs-on: ubuntu-latest
@@ -11,40 +11,14 @@ jobs:
1111
- uses: actions/checkout@v2
1212
- uses: actions/setup-node@v1
1313
with:
14-
node-version: "18.x"
14+
node-version: "14.x"
1515
- run: yarn install --frozen-lockfile
1616
- run: yarn test
1717
- run: yarn build
18-
- run: cd ./dist && yarn pack --filename=../package.tgz
18+
- run: cd ./build && yarn pack --filename=../package.tgz
1919
if: "!contains(github.event.head_commit.message, '[skip publish]')"
20-
- uses: Klemensas/action-autotag@stable
20+
- run: yarn semantic-release
2121
if: "!contains(github.event.head_commit.message, '[skip publish]')"
22-
id: update_tag
23-
with:
24-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
25-
tag_prefix: "v"
26-
- name: Publish on NPM
27-
uses: JS-DevTools/npm-publish@v1
28-
with:
29-
package: ./dist/package.json
30-
token: "${{ secrets.NPM_TOKEN }}"
31-
- name: Create Release
32-
if: steps.update_tag.outputs.tagname && !contains(github.event.head_commit.message, '[skip publish]')
33-
uses: actions/create-release@v1
34-
id: create_release
3522
env:
36-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37-
with:
38-
tag_name: ${{ steps.update_tag.outputs.tagname }}
39-
release_name: Release ${{ steps.update_tag.outputs.tagname }}
40-
- name: Upload Release Asset
41-
if: steps.update_tag.outputs.tagname && !contains(github.event.head_commit.message, '[skip publish]')
42-
id: upload-release-asset
43-
uses: actions/upload-release-asset@v1
44-
env:
45-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46-
with:
47-
upload_url: ${{ steps.create_release.outputs.upload_url }}
48-
asset_path: ./package.tgz
49-
asset_name: simple-scaffold ${{ steps.update_tag.outputs.tagname }}.tgz
50-
asset_content_type: application/tgz
23+
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
24+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

CHANGELOG.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Change Log
2+
3+
### [1.1.4](https://github.com/chenasraf/simple-scaffold/compare/v1.1.3...v1.1.4) (2023-04-24)
4+
5+
### Features
6+
7+
- append-data cli flag
8+
([2f4f7fc](https://github.com/chenasraf/simple-scaffold/commit/2f4f7fce47669e37ff49154fbec2acdfd0f5860e))
9+
10+
### Bug Fixes
11+
12+
- github action node version
13+
([7c19c53](https://github.com/chenasraf/simple-scaffold/commit/7c19c533376dc6904231e5cc51c7a4b2658c66e0))
14+
- github action node version
15+
([94fec76](https://github.com/chenasraf/simple-scaffold/commit/94fec766165f7540c578dbf2d0aeeb6ea3969ad8))
16+
17+
### [1.1.3](https://github.com/chenasraf/simple-scaffold/compare/v1.1.2...v1.1.3) (2023-03-11)
18+
19+
### Bug Fixes
20+
21+
- base path
22+
([943717a](https://github.com/chenasraf/simple-scaffold/commit/943717a76998ec0609f2072c886df6b4775f2ea2))
23+
- binary files + add tests
24+
([e450ad2](https://github.com/chenasraf/simple-scaffold/commit/e450ad242ed70ae928b19964da38cdcb1b6cf659))
25+
26+
## [1.1.0](https://github.com/chenasraf/simple-scaffold/compare/v1.0.4...v1.1.0) (2022-04-21)
27+
28+
### [1.0.3](https://github.com/chenasraf/simple-scaffold/compare/v1.0.2...v1.0.3) (2022-03-03)
29+
30+
### [1.0.1-pre.1](https://github.com/chenasraf/simple-scaffold/compare/v1.0.0...v1.0.1-pre.1) (2022-02-17)
31+
32+
### [0.7.5](https://github.com/chenasraf/simple-scaffold/compare/v0.7.4...v0.7.5) (2021-09-26)
33+
34+
### [0.7.4](https://github.com/chenasraf/simple-scaffold/compare/v0.7.3...v0.7.4) (2021-09-26)
35+
36+
### [0.7.3](https://github.com/chenasraf/simple-scaffold/compare/v0.7.2...v0.7.3) (2021-09-26)
37+
38+
### [0.7.2](https://github.com/chenasraf/simple-scaffold/compare/v0.6.1...v0.7.2) (2021-04-19)
39+
40+
### [0.6.1](https://github.com/chenasraf/simple-scaffold/compare/v0.6.0...v0.6.1) (2021-02-01)
41+
42+
### Bug Fixes
43+
44+
- binary files
45+
([7c0c347](https://github.com/chenasraf/simple-scaffold/commit/7c0c3470020d7c166ea68a8effa6df65ec38f2c8))
46+
47+
## [0.6.0](https://github.com/chenasraf/simple-scaffold/compare/v0.5.0...v0.6.0) (2021-02-01)
48+
49+
### Bug Fixes
50+
51+
- support deeper file structure
52+
([4afafa5](https://github.com/chenasraf/simple-scaffold/commit/4afafa5a4af2e3f4b0af54f20811ecb2c8d98560))
53+
54+
## [0.5.0](https://github.com/chenasraf/simple-scaffold/compare/v0.4.5...v0.5.0) (2019-02-27)
55+
56+
### [0.4.5](https://github.com/chenasraf/simple-scaffold/compare/v0.4.4...v0.4.5) (2019-02-27)
57+
58+
### [0.4.4](https://github.com/chenasraf/simple-scaffold/compare/v0.4.3...v0.4.4) (2019-02-27)
59+
60+
### [0.4.3](https://github.com/chenasraf/simple-scaffold/compare/v0.4.2...v0.4.3) (2019-02-27)
61+
62+
### [0.4.2](https://github.com/chenasraf/simple-scaffold/compare/v0.4.1...v0.4.2) (2019-02-25)
63+
64+
### [0.4.1](https://github.com/chenasraf/simple-scaffold/compare/v0.3.1...v0.4.1) (2019-02-25)
65+
66+
### [0.3.1](https://github.com/chenasraf/simple-scaffold/compare/v0.3.0...v0.3.1) (2018-01-15)
67+
68+
## [0.3.0](https://github.com/chenasraf/simple-scaffold/compare/v0.2.0...v0.3.0) (2018-01-15)
69+
70+
## [0.2.0](https://github.com/chenasraf/simple-scaffold/compare/v0.1.5...v0.2.0) (2018-01-05)
71+
72+
### [0.1.5](https://github.com/chenasraf/simple-scaffold/compare/v0.1.4...v0.1.5) (2018-01-01)
73+
74+
### [0.1.4](https://github.com/chenasraf/simple-scaffold/compare/v0.1.3...v0.1.4) (2018-01-01)
75+
76+
### [0.1.3](https://github.com/chenasraf/simple-scaffold/compare/v0.1.2...v0.1.3) (2018-01-01)
77+
78+
### 0.1.2 (2018-01-01)

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
"build-docs": "yarn build-docs-theme && yarn install --frozen-lockfile && typedoc",
3232
"build-docs-theme": "cd doc-theme && yarn install && yarn build && cd ..",
3333
"watch-docs": "yarn typedoc --watch",
34-
"audit-fix": "npm_config_yes=true npx yarn-audit-fix --flow=convert"
34+
"audit-fix": "npm_config_yes=true npx yarn-audit-fix --flow=convert",
35+
"changelog": "conventional-changelog -p conventionalcommits -i CHANGELOG.md -s -r 0"
3536
},
3637
"dependencies": {
3738
"chalk": "^4.1.2",
@@ -40,14 +41,19 @@
4041
"handlebars": "^4.7.7",
4142
"lodash": "^4.17.21",
4243
"massarg": "^1.0.7-pre.1",
44+
"semantic-release": "^21.0.1",
4345
"util.promisify": "^1.1.1"
4446
},
4547
"devDependencies": {
48+
"@semantic-release/changelog": "^6.0.3",
49+
"@semantic-release/git": "^10.0.1",
50+
"@semantic-release/release-notes-generator": "^10.0.3",
4651
"@types/glob": "^8.1.0",
4752
"@types/jest": "^29.4.0",
4853
"@types/lodash": "^4.14.171",
4954
"@types/mock-fs": "^4.13.1",
5055
"@types/node": "^18.15.1",
56+
"conventional-changelog-cli": "^2.2.2",
5157
"doc-theme": "file:./doc-theme",
5258
"jest": "^29.5.0",
5359
"mock-fs": "^5.2.0",

release.config.js

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
/** @type {import('semantic-release').Options} */
2+
module.exports = {
3+
branches: [
4+
"+([0-9])?(.{+([0-9]),x}).x",
5+
"master",
6+
"next",
7+
"next-major",
8+
{ name: "beta", prerelease: true },
9+
{ name: "alpha", prerelease: true },
10+
],
11+
analyzeCommits: {
12+
path: "semantic-release-conventional-commits",
13+
majorTypes: ["major", "breaking"],
14+
minorTypes: ["minor", "feat", "feature"],
15+
patchTypes: ["patch", "fix", "bugfix", "refactor", "perf", "revert"],
16+
},
17+
plugins: [
18+
[
19+
"@semantic-release/commit-analyzer",
20+
{
21+
preset: "conventionalcommits",
22+
parserOpts: {
23+
noteKeywords: ["breaking:", "breaking-fix:", "breaking-feat:"],
24+
},
25+
releaseRules: [
26+
{ type: "feat", section: "Features", release: "minor" },
27+
{ type: "docs", section: "Misc", release: "patch" },
28+
{ type: "fix", section: "Bug Fixes", release: "patch" },
29+
{ type: "refactor", section: "Misc", release: "patch" },
30+
{ type: "docs", section: "Misc", release: "patch" },
31+
{ type: "perf", section: "Misc", release: "patch" },
32+
{ type: "build", section: "Misc", release: "patch" },
33+
{ type: "chore", section: "Misc", release: "patch" },
34+
{ type: "test", section: "Misc", release: "patch" },
35+
],
36+
},
37+
],
38+
[
39+
"@semantic-release/release-notes-generator",
40+
{
41+
preset: "conventionalcommits",
42+
parserOpts: {
43+
noteKeywords: ["breaking"],
44+
types: [
45+
{ type: "feat", section: "Features", release: "minor" },
46+
{ type: "docs", section: "Misc", release: "patch" },
47+
{ type: "fix", section: "Bug Fixes", release: "patch" },
48+
{ type: "refactor", section: "Misc", release: "patch" },
49+
{ type: "docs", section: "Misc", release: "patch" },
50+
{ type: "perf", section: "Misc", release: "patch" },
51+
{ type: "build", section: "Misc", release: "patch" },
52+
{ type: "chore", section: "Misc", release: "patch" },
53+
{ type: "test", section: "Misc", release: "patch" },
54+
],
55+
},
56+
},
57+
],
58+
[
59+
"@semantic-release/changelog",
60+
{
61+
changelogFile: "CHANGELOG.md",
62+
changelogTitle: "# Change Log",
63+
},
64+
],
65+
[
66+
"@semantic-release/npm",
67+
{
68+
packageRoot: "build",
69+
},
70+
],
71+
[
72+
"@semantic-release/github",
73+
{
74+
assets: ["package.tgz"],
75+
},
76+
],
77+
[
78+
"@semantic-release/git",
79+
{
80+
assets: ["CHANGELOG.md", "package.json"],
81+
},
82+
],
83+
],
84+
}

0 commit comments

Comments
 (0)