Skip to content

Commit ffc87f1

Browse files
authored
ci(release): automatic releases + PR naming convention check (#520)
1 parent a2bb44a commit ffc87f1

File tree

4 files changed

+4094
-1605
lines changed

4 files changed

+4094
-1605
lines changed

.github/workflows/naming.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Naming conventions
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, reopened]
6+
7+
permissions:
8+
pull-requests: read
9+
10+
jobs:
11+
naming:
12+
name: Naming conventions
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: deepakputhraya/action-pr-title@master
16+
with:
17+
regex: '(feat|fix|ci|docs|test|refactor|build|chore|script)\(.+\): .+'

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: write
8+
issues: write
9+
pull-requests: write
10+
11+
jobs:
12+
release:
13+
name: Release
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v2
20+
with:
21+
node-version: 16
22+
- name: Install dependencies
23+
run: yarn
24+
- name: Release
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
28+
run: npx semantic-release

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"eslint-plugin-prettier": "^4.0.0",
2222
"jest": "^22.1.4",
2323
"prettier": "^2.4.1",
24+
"semantic-release": "^19.0.3",
2425
"serverless": "^1.83.3"
2526
},
2627
"dependencies": {
@@ -35,7 +36,6 @@
3536
"moment": "^2.29.1",
3637
"ramda": "^0.25.0"
3738
},
38-
"peerDependencies": {},
3939
"jest": {
4040
"testEnvironment": "node"
4141
}

0 commit comments

Comments
 (0)