Skip to content

Commit 0af24e9

Browse files
authored
feat: add release ci (#10)
1 parent 57033b2 commit 0af24e9

File tree

4 files changed

+2674
-49
lines changed

4 files changed

+2674
-49
lines changed

.github/workflows/release.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
env:
9+
YARN_CACHE_FOLDER: ~/.yarn
10+
11+
jobs:
12+
release:
13+
name: Release
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v1
23+
with:
24+
node-version: 12
25+
26+
- name: Caching
27+
uses: actions/cache@v2
28+
with:
29+
path: ${{ env.YARN_CACHE_FOLDER }}
30+
key: ${{ runner.OS }}-yarn-${{ hashFiles('**/yarn.lock') }}
31+
restore-keys: |
32+
${{ runner.OS }}-yarn-${{ env.cache-name }}
33+
${{ runner.OS }}-yarn-
34+
35+
- name: Installing dependencies
36+
run: yarn install --frozen-lockfile
37+
38+
- name: Build
39+
run: yarn build
40+
41+
- name: Release
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
45+
run: yarn release

.releaserc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"plugins": [
3+
"@semantic-release/commit-analyzer",
4+
"@semantic-release/release-notes-generator",
5+
["@semantic-release/npm", { "npmPublish": true }],
6+
"@semantic-release/changelog",
7+
"@semantic-release/git"
8+
],
9+
"branches": ["main"]
10+
}

package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"lint": "prettier --check . && eslint --max-warnings 0 .",
2424
"start": "rollup -c rollup.config.js --watch",
2525
"test": "NODE_OPTIONS=--experimental-vm-modules jest --forceExit --detectOpenHandles",
26-
"test:watch": "yarn test --watch"
26+
"test:watch": "yarn test --watch",
27+
"release": "semantic-release"
2728
},
2829
"dependencies": {
2930
"@feathersjs/adapter-commons": "5.0.0-pre.3",
@@ -34,6 +35,11 @@
3435
"devDependencies": {
3536
"@geprog/eslint-config": "0.0.1",
3637
"@jest/types": "26.6.2",
38+
"@semantic-release/changelog": "5.0.1",
39+
"@semantic-release/commit-analyzer": "8.0.1",
40+
"@semantic-release/git": "9.0.0",
41+
"@semantic-release/npm": "7.1.3",
42+
"@semantic-release/release-notes-generator": "9.0.3",
3743
"@types/jest": "26.0.23",
3844
"@types/node": "15.12.4",
3945
"@vue/test-utils": "2.0.0-rc.6",
@@ -46,6 +52,7 @@
4652
"rollup": "2.52.2",
4753
"rollup-plugin-dts": "3.0.2",
4854
"rollup-plugin-typescript2": "0.30.0",
55+
"semantic-release": "17.4.4",
4956
"ts-jest": "26.5.6",
5057
"ts-node": "10.0.0",
5158
"typescript": "4.2.4"

0 commit comments

Comments
 (0)