Skip to content

Commit cbeec2c

Browse files
committed
add release github action
1 parent bad368c commit cbeec2c

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
8+
jobs:
9+
release:
10+
name: Release
11+
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')
12+
runs-on: Ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v1
15+
- uses: actions/setup-node@v1
16+
with:
17+
registry-url: "https://registry.npmjs.org"
18+
- run: git switch master
19+
- run: |
20+
if [ -f "yarn.lock" ]; then
21+
yarn install
22+
else
23+
npm install
24+
fi
25+
- run: npm run release:trigger
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
29+
SLACK_INCOMING_HOOK: ${{ secrets.SLACK_INCOMING_HOOK }}

0 commit comments

Comments
 (0)