Skip to content

Commit 5c5babc

Browse files
traviryansonshine
authored andcommitted
ci(release): defined a github workflow to release with semantic-release (commitizen#923)
1 parent 475354a commit 5c5babc

File tree

1 file changed

+9
-20
lines changed

1 file changed

+9
-20
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,20 @@
11
name: Release
2-
on:
2+
"on":
33
push:
44
branches:
5-
- main
5+
- master
66
jobs:
77
release:
8-
name: Release
8+
name: release
99
runs-on: ubuntu-latest
1010
steps:
11-
- name: Checkout
12-
uses: actions/checkout@v2
13-
with:
14-
fetch-depth: 0
15-
- name: Setup Node.js
16-
uses: actions/setup-node@v2
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v2
1713
with:
14+
cache: npm
1815
node-version: lts/*
19-
- name: Git Config
20-
run: git config --global user.email "[email protected]" && git config --global user.name "Your Name"
21-
- name: Install dependencies
22-
run: npm ci
23-
- name: Test
24-
run: npm test
25-
- name: Build
26-
run: npm run build
27-
- name: Release
16+
- run: npm clean-install
17+
- run: npx semantic-release
2818
env:
2919
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
31-
run: npx semantic-release
20+
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

0 commit comments

Comments
 (0)