Skip to content

Commit 46bbab5

Browse files
feat: semantic-release add changelog plugin (#1506)
* feat: add changelog plugin * fix: added root permissions * fix: temporary fix copy-version script * chore: use actions/setup-node@v2 instead of Node container * fix: use .releaserc.json instead of release.config.js * chore: remove @semantic-release/git plugin * chore: added temporary branch * fix: swap branch names * chore: determine user * fix: change order of the plugins in the .releaserc.json * chore: update branches * chore: remove dry run flag
1 parent e297ffe commit 46bbab5

File tree

4 files changed

+668
-475
lines changed

4 files changed

+668
-475
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
push:
44
branches:
55
- master
6+
- main
67

78
jobs:
89
release:
@@ -23,4 +24,4 @@ jobs:
2324
env:
2425
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2526
GH_TOKEN: ${{ secrets.GH_TOKEN }}
26-
run: npx semantic-release
27+
run: yarn semantic-release --branches master main

.releaserc.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"plugins": [
3+
"@semantic-release/commit-analyzer",
4+
"@semantic-release/release-notes-generator",
5+
[
6+
"@semantic-release/changelog",
7+
{
8+
"changelogFile": "./CHANGELOG.md"
9+
}
10+
],
11+
"@semantic-release/github",
12+
"@semantic-release/npm"
13+
]
14+
}

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
"@rollup/plugin-node-resolve": "^10.0.0",
8686
"@rollup/plugin-replace": "^2.3.4",
8787
"@rollup/plugin-typescript": "8.2.1",
88+
"@semantic-release/changelog": "^6.0.1",
8889
"@stream-io/rollup-plugin-node-builtins": "^2.1.5",
8990
"@testing-library/jest-dom": "5.11.6",
9091
"@testing-library/react": "^11.2.2",
@@ -158,7 +159,7 @@
158159
"rollup-plugin-terser": "^7.0.2",
159160
"rollup-plugin-url": "^3.0.1",
160161
"rollup-plugin-visualizer": "^4.2.0",
161-
"semantic-release": "^18.0.0",
162+
"semantic-release": "^19.0.2",
162163
"semantic-release-cli": "^5.4.4",
163164
"stream-chat": "6.4.0",
164165
"style-loader": "^2.0.0",
@@ -181,7 +182,7 @@
181182
"bundle": "rollup -c",
182183
"bundle-size": "BUNDLE_SIZE=true yarn bundle",
183184
"build-translations": "i18next",
184-
"copy-version": "echo '\u001b[34mℹ\u001b[0m Copying Version to \u001b[34msrc/version.ts\u001b[0m' && PACKAGE_VERSION=$(node -pe 'require(`./package.json`).version') && PACKAGE_STRING=\"'$PACKAGE_VERSION'\" && echo 'export const version = '$PACKAGE_STRING';' > src/version.ts && echo '\u001b[32m✓\u001b[0m Done Copying Version'",
185+
"copy-version": "echo '\u001b[34mℹ\u001b[0m Copying Version to \u001b[34msrc/version.ts\u001b[0m' && PACKAGE_VERSION=$(node -pe 'require(`./package.json`).version') && PACKAGE_STRING=\"'$PACKAGE_VERSION'\" && echo 'export const version = '$PACKAGE_STRING';' > ./src/version.ts && echo '\u001b[32m✓\u001b[0m Done Copying Version'",
185186
"coverage": "jest --collectCoverage && codecov",
186187
"eslint": "eslint '**/*.{js,md,ts,jsx,tsx}' --max-warnings 0",
187188
"lint": "prettier --list-different 'src/**/*.{js,ts,tsx,md,json}' .eslintrc.json .prettierrc babel.config.js && eslint 'src/**/*.{js,ts,tsx,md}' --max-warnings 0 && yarn validate-translations",

0 commit comments

Comments
 (0)