Skip to content

Commit aa4439e

Browse files
feat: add semantic-release (#920)
1 parent 66ec439 commit aa4439e

File tree

5 files changed

+4747
-101
lines changed

5 files changed

+4747
-101
lines changed

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- canary
7+
jobs:
8+
release:
9+
name: Release
10+
runs-on: ubuntu-20.04
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: 12
20+
- name: Install dependencies
21+
run: npm ci
22+
- name: Lint
23+
run: npm run lint
24+
- name: Build
25+
run: npm run build
26+
- name: Release
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
30+
run: npx semantic-release

.releaserc.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"branches": [
3+
"main",
4+
{ "name": "canary", "prerelease": true }
5+
],
6+
"plugins": [
7+
["@semantic-release/commit-analyzer", {
8+
"preset": "conventionalcommits"
9+
}],
10+
["@semantic-release/release-notes-generator", {
11+
"preset": "conventionalcommits",
12+
"presetConfig": {
13+
"types": [
14+
{ "type": "feat", "section": "Features", "hidden": false },
15+
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
16+
{ "type": "perf", "section": "Performance Improvements", "hidden": false },
17+
{ "type": "revert", "section": "Reverts", "hidden": false },
18+
{ "type": "docs", "section": "Documentation", "hidden": false },
19+
{ "type": "style", "section": "Styles", "hidden": false },
20+
{ "type": "chore", "section": "Miscellaneous Chores", "hidden": false },
21+
{ "type": "refactor", "section": "Code Refactoring", "hidden": false },
22+
{ "type": "test", "section": "Tests", "hidden": false },
23+
{ "type": "build", "section": "Build System", "hidden": false },
24+
{ "type": "ci", "section": "Continuous Integration", "hidden": false }
25+
]
26+
}
27+
}],
28+
"@semantic-release/git",
29+
"@semantic-release/npm"
30+
]
31+
}

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# CHANGELOG
2+
3+
The changelog is automatically updated using
4+
[semantic-release](https://github.com/semantic-release/semantic-release). You
5+
can see it on the [releases page](../../releases).

0 commit comments

Comments
 (0)