-
Notifications
You must be signed in to change notification settings - Fork 3k
55 lines (53 loc) · 1.53 KB
/
ci.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
49
50
51
52
53
54
55
name: WePY CI Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-18.04
strategy:
matrix:
node-version: [10.x]
steps:
- name: Install expect
run: |
sudo apt -qy update && sudo apt install -y expect
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run bootstrap
- run: npm run test
- run: npm run bootstrap:prod
- run: npm run test:build
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
release:
if: github.event_name == 'push' && startsWith(github.event.head_commit.message, 'release:')
name: Release
runs-on: ubuntu-18.04
needs: [build]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: git reset --hard
- run: |
git config --global user.email "gcaufy@gmail.com"
git config --global user.name "WePY CI"
- run: npm install
- run: npm run bootstrap
- run: git status
- run: git checkout .
- name: NPM release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
run: node ./scripts/ci-release.js
- run: git status
- run: git log