Skip to content

Commit 9cb10e9

Browse files
authored
Merge pull request #5 from stackr23/develop
* config(vsCode): add lint/format settings * config: add `semantic-release` settings * update CHANGELOG.md for v1.0.0 * config(gh-actions): finish `semantic-release` workflow
2 parents c821951 + 9c5e511 commit 9cb10e9

File tree

5 files changed

+121
-33
lines changed

5 files changed

+121
-33
lines changed

.github/workflows/github-action-release.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: GitHub Actions Demo
1+
name: Semantic Release
22
on:
33
push:
44
branches:
@@ -11,11 +11,18 @@ jobs:
1111
name: Semantic Release Process
1212
runs-on: ubuntu-latest
1313
steps:
14-
- name: Setup node
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
with:
17+
fetch-depth: 0
18+
- name: Setup Node
1519
uses: actions/setup-node@v2
1620
with:
1721
node-version: 14
18-
- run: echo "RUNNING SEMANTIC RELEASE"
22+
- name: Install Semantic Release Packages
23+
run: npm i -g semantic-release @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/changelog @semantic-release/npm @semantic-release/git @semantic-release/github
24+
- name: Exec Semantic Release
25+
run: npx semantic-release
1926
env:
2027
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2128
GH_TOKEN: ${{ secrets.GH_TOKEN }}

.github/workflows/github-action-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: GitHub Actions Demo
1+
name: Test and Lint
22
on:
33
push:
44
branches:
@@ -20,7 +20,7 @@ jobs:
2020
uses: actions/checkout@v2
2121
with:
2222
fetch-depth: 0
23-
- name: Setup node
23+
- name: Setup Node v${{ matrix.node }}
2424
uses: actions/setup-node@v2
2525
with:
2626
node-version: ${{ matrix.node }}

.releaserc

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"branches": [
3+
"master",
4+
"main"
5+
],
6+
"repositoryUrl": "https://github.com/stackr23/react-stack",
7+
"plugins": [
8+
[
9+
"@semantic-release/commit-analyzer",
10+
{
11+
"config": "@stackr23/conventional-changelog-config",
12+
"releaseRules": [
13+
{
14+
"type": "feat",
15+
"release": "minor"
16+
},
17+
{
18+
"type": "fix",
19+
"release": "patch"
20+
},
21+
{
22+
"type": "config",
23+
"release": "patch"
24+
},
25+
{
26+
"type": "script",
27+
"release": "patch"
28+
},
29+
{
30+
"type": "style",
31+
"release": "patch"
32+
},
33+
{
34+
"type": "deps",
35+
"release": "patch"
36+
}
37+
]
38+
}
39+
],
40+
[
41+
"@semantic-release/release-notes-generator",
42+
{
43+
"config": "@stackr23/conventional-changelog-config"
44+
}
45+
],
46+
[
47+
"@semantic-release/changelog",
48+
{
49+
"changelogFile": "CHANGELOG.md",
50+
"changelogTitle": "# Changelog\n\n> generated with [@semantic-release/changelog](https://github.com/semantic-release/changelog)\n\n"
51+
}
52+
],
53+
[
54+
"@semantic-release/npm",
55+
{
56+
"npmPublish": false,
57+
"tarballDir": "releases"
58+
}
59+
],
60+
[
61+
"@semantic-release/git",
62+
{
63+
"assets": [
64+
"CHANGELOG.md",
65+
"package.json"
66+
],
67+
"message": "chore(release): 🤖🔖🚀 v${nextRelease.version} \n\n${nextRelease.notes} [skip ci]"
68+
}
69+
],
70+
[
71+
"@semantic-release/github"
72+
]
73+
]
74+
}

.vscode/settings.json

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
11
{
2-
"editor.formatOnSaveTimeout": 500,
3-
"editor.defaultFormatter": "teeLang.vsprettier",
4-
"vsprettier.requireConfig": true,
5-
"vsprettier.packageManager": "npm",
6-
"vsprettier.useEsLint": false,
7-
"vsprettier.useStyleLint": true,
8-
"editor.codeActionsOnSave": {
9-
"source.fixAll.eslint": true
10-
},
11-
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
12-
"eslint.alwaysShowStatus": true,
13-
"eslint.run": "onType",
14-
"eslint.lintTask.enable": true,
15-
"eslint.workingDirectories": [
16-
{
17-
"directory": ".",
18-
"changeProcessCWD": true
19-
}
20-
],
21-
"js/ts.implicitProjectConfig.checkJs": true,
2+
// disable vsCode's internal default formatter
223
"javascript.validate.enable": false,
234
"javascript.format.enable": false,
24-
"[javascriptreact,typescriptreact]": {
5+
"typescript.validate.enable": false,
6+
"typescript.format.enable": false,
7+
// use prettier as default formatter (scss, json, md, yml, ...)
8+
"editor.defaultFormatter": "esbenp.prettier-vscode",
9+
// use ESLINT for these file types
10+
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
11+
"eslint.run": "onType", // auto check on typing
12+
"editor.codeActionsOnSave": { "source.fixAll.eslint": true }, // auto fix on save
13+
"eslint.alwaysShowStatus": true, // 'IgorSbitnev.error-gutters'
14+
"eslint.workingDirectories": [{ "directory": ".", "changeProcessCWD": true }],
15+
// Multiple languages specific editor settings NOT AVAILABLE YET
16+
// https://github.com/microsoft/vscode/issues/51935
17+
"[javascript]": {
18+
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
19+
"editor.formatOnPaste": false,
20+
"editor.formatOnSave": false,
21+
"editor.formatOnType": false
22+
},
23+
"[javascriptreact]": {
24+
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
25+
"editor.formatOnPaste": false,
26+
"editor.formatOnSave": false,
27+
"editor.formatOnType": false
28+
},
29+
"[typescript]": {
2530
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
2631
"editor.formatOnPaste": false,
2732
"editor.formatOnSave": false,

CHANGELOG.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
1-
# Changelog
2-
3-
> generated with [@semantic-release/changelog](https://github.com/semantic-release/changelog)
4-
5-
# [1.0.0](https://github.com/stackr23/react-stack/compare/46248cd43a1d3c7e34875d12f4a761fed191dba3...v1.0.0) (2021-08-30)
1+
# 1.0.0 (2021-09-06)
62

73
### :sparkles: Features
84

9-
- **ci:** basic implementation of github actions (karma test) ([#1](https://github.com/stackr23/react-stack/issues/1)) ([312693e](https://github.com/stackr23/react-stack/commit/312693e6ef6543d71080de9c29b4457dea6f59f2))
5+
- **ci:** basic implementation of github actions (karma test)
106
- add webpack and basic entry files ([93bfbc5](https://github.com/stackr23/react-stack/commit/93bfbc556623d2209c5e87da28a1273eeb542833))
117

128
### :wrench: Configs
139

10+
- add `semantic-release` settings ([6cc5469](https://github.com/stackr23/react-stack/commit/6cc5469afd3a9d6fa86c0357cfe35478f3b81f9a))
1411
- **CI:** add `npm run lint` to default test job ([0dc4c89](https://github.com/stackr23/react-stack/commit/0dc4c89dfd032ffd033ef660b0ea4d0667310cf8))
1512
- **CI:** add release job for main branch (testrun) ([#4](https://github.com/stackr23/react-stack/issues/4)) ([e85b420](https://github.com/stackr23/react-stack/commit/e85b4206085a55331978e05eda5c7f21ef2a1f56))
1613
- **eslint:** allow JSX in `.ts?` files ([9fe26d5](https://github.com/stackr23/react-stack/commit/9fe26d5a02e66eaf3d1434fd78e9eccf45c6f6f3))
1714
- **eslint:** use import-resolver for typescript ([fa50e76](https://github.com/stackr23/react-stack/commit/fa50e7682f132a7e3d1f9460ab3fad40c5ea3621))
1815
- **gitignore:** ignore cache folders ([ff0d789](https://github.com/stackr23/react-stack/commit/ff0d789fe97d1cdf7734d83fdd674bb4acf1845e))
1916
- **mrm:** `mrm --preset @stackr23/mrm init` ([dac6355](https://github.com/stackr23/react-stack/commit/dac6355a73f531bdbfeeeab5ed51e7559b770f2c))
20-
- **npm:** add `publishConfig` + `private` flag ([971bdba](https://github.com/stackr23/react-stack/commit/971bdbac07632721cfa5309aae4d40db2322b702))
17+
- **npm:** add `publishConfig` + `private` flag ([07bd404](https://github.com/stackr23/react-stack/commit/07bd404097f05b6492f8ba4419d80d5044dae89e))
2118
- **typescript:** add options for TS compiler ([defad23](https://github.com/stackr23/react-stack/commit/defad236e1d0546f6a03e5690cc3e4fa2e5dfc98))
19+
- **vsCode:** add lint/format settings ([4066f62](https://github.com/stackr23/react-stack/commit/4066f6283d491c3de497987e38c559bfdc737709))
2220
- **vsCode:** prevent prettier to format TS files ([e16b45c](https://github.com/stackr23/react-stack/commit/e16b45c99df9a285776d6342d39d0db4083131cc))
2321
- add `tsconfig.json` ([41a70cf](https://github.com/stackr23/react-stack/commit/41a70cf8eef483c1eec712cf8166cd0411b5b753))
2422
- npm init ([46248cd](https://github.com/stackr23/react-stack/commit/46248cd43a1d3c7e34875d12f4a761fed191dba3))
23+
24+
### :memo: Documentations
25+
26+
- add CHANGELOG for v1.0.0 ([c821951](https://github.com/stackr23/react-stack/commit/c821951492b45d8215116985dc57d9eef7c9d8f5))

0 commit comments

Comments
 (0)