-
Notifications
You must be signed in to change notification settings - Fork 53
48 lines (48 loc) · 1.25 KB
/
npm-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: npm-release
on:
push:
branches:
- release
paths-ignore:
- 'package.json'
- 'CHANGELOG.md'
jobs:
build:
name: release
env:
MY_SECRET : ${{secrets.BYCNTCHEN}}
USER_NAME : githubaction
USER_EMAIL : [email protected]
NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: |
npm install
- name: standard-version
run: |
git config --local user.name $USER_NAME
git config --local user.email $USER_EMAIL
git checkout -b release
npm run release
- name: push banch
run: |
git remote set-url origin https://[email protected]/$GITHUB_REPOSITORY.git
git push origin -u release
- name: npm publish
run: |
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
npm publish
- name: merge master
run: |
git checkout master
git merge release
git push origin -u master