4
4
push :
5
5
branches :
6
6
- master
7
- # tags: v[0-9]+.[0-9]+.[0-9]+
7
+ tags : v[0-9]+.[0-9]+.[0-9]+
8
8
pull_request :
9
9
branches :
10
10
- master
@@ -31,76 +31,76 @@ jobs:
31
31
${{ runner.os }}-yarn-
32
32
- run : yarn install --frozen-lockfile --prefer-offline
33
33
- run : yarn compile
34
- # lint:
35
- # name: Lint code
36
- # runs-on: ubuntu-latest
37
- # steps:
38
- # - uses: actions/checkout@v2
39
- # - name: Use Node.js
40
- # uses: actions/setup-node@v1
41
- # with:
42
- # node-version: 14.x
43
- # - name: Get yarn cache directory path
44
- # id: yarn-cache-dir-path
45
- # run: echo "::set-output name=dir::$(yarn cache dir)"
46
- # - uses: actions/cache@v2
47
- # id: yarn-cache
48
- # with:
49
- # path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
50
- # key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
51
- # restore-keys: |
52
- # ${{ runner.os }}-yarn-
53
- # - run: yarn install --frozen-lockfile --prefer-offline
54
- # - run: yarn lint
55
- # test:
56
- # name: Run tests (Node.js)
57
- # runs-on: ubuntu-latest
58
- # strategy:
59
- # matrix:
60
- # node-version: [14.x, 15.x]
61
- # steps:
62
- # - uses: actions/checkout@v2
63
- # - name: Use Node.js ${{ matrix.node-version }}
64
- # uses: actions/setup-node@v1
65
- # with:
66
- # node-version: ${{ matrix.node-version }}
67
- # - name: Get yarn cache directory path
68
- # id: yarn-cache-dir-path
69
- # run: echo "::set-output name=dir::$(yarn cache dir)"
70
- # - uses: actions/cache@v2
71
- # id: yarn-cache
72
- # with:
73
- # path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
74
- # key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
75
- # restore-keys: |
76
- # ${{ runner.os }}-yarn-
77
- # - run: yarn install --frozen-lockfile --prefer-offline
78
- # - run: yarn test
79
- # - name: Codecov
80
- # uses: codecov/codecov-action@v1
81
- # publish:
82
- # name: Publish to npm
83
- # runs-on: ubuntu-latest
84
- # if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
85
- # steps:
86
- # - uses: actions/checkout@v2
87
- # - name: Use Node.js
88
- # uses: actions/setup-node@v1
89
- # with:
90
- # node-version: 14.x
91
- # registry-url: 'https://registry.npmjs.org'
92
- # - name: Get yarn cache directory path
93
- # id: yarn-cache-dir-path
94
- # run: echo "::set-output name=dir::$(yarn cache dir)"
95
- # - uses: actions/cache@v2
96
- # id: yarn-cache
97
- # with:
98
- # path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
99
- # key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
100
- # restore-keys: |
101
- # ${{ runner.os }}-yarn-
102
- # - run: yarn install --frozen-lockfile --prefer-offline
103
- # - run: yarn compile
104
- # - run: yarn publish
105
- # env:
106
- # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
34
+ lint :
35
+ name : Lint code
36
+ runs-on : ubuntu-latest
37
+ steps :
38
+ - uses : actions/checkout@v2
39
+ - name : Use Node.js
40
+ uses : actions/setup-node@v1
41
+ with :
42
+ node-version : 14.x
43
+ - name : Get yarn cache directory path
44
+ id : yarn-cache-dir-path
45
+ run : echo "::set-output name=dir::$(yarn cache dir)"
46
+ - uses : actions/cache@v2
47
+ id : yarn-cache
48
+ with :
49
+ path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
50
+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
51
+ restore-keys : |
52
+ ${{ runner.os }}-yarn-
53
+ - run : yarn install --frozen-lockfile --prefer-offline
54
+ - run : yarn lint
55
+ test :
56
+ name : Run tests
57
+ runs-on : ubuntu-latest
58
+ strategy :
59
+ matrix :
60
+ node-version : [14.x, 15.x]
61
+ steps :
62
+ - uses : actions/checkout@v2
63
+ - name : Use Node.js ${{ matrix.node-version }}
64
+ uses : actions/setup-node@v1
65
+ with :
66
+ node-version : ${{ matrix.node-version }}
67
+ - name : Get yarn cache directory path
68
+ id : yarn-cache-dir-path
69
+ run : echo "::set-output name=dir::$(yarn cache dir)"
70
+ - uses : actions/cache@v2
71
+ id : yarn-cache
72
+ with :
73
+ path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
74
+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
75
+ restore-keys : |
76
+ ${{ runner.os }}-yarn-
77
+ - run : yarn install --frozen-lockfile --prefer-offline
78
+ - run : yarn test
79
+ - name : Codecov
80
+ uses : codecov/codecov-action@v1
81
+ publish :
82
+ name : Publish to npm
83
+ runs-on : ubuntu-latest
84
+ if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
85
+ steps :
86
+ - uses : actions/checkout@v2
87
+ - name : Use Node.js
88
+ uses : actions/setup-node@v1
89
+ with :
90
+ node-version : 14.x
91
+ registry-url : ' https://registry.npmjs.org'
92
+ - name : Get yarn cache directory path
93
+ id : yarn-cache-dir-path
94
+ run : echo "::set-output name=dir::$(yarn cache dir)"
95
+ - uses : actions/cache@v2
96
+ id : yarn-cache
97
+ with :
98
+ path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
99
+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
100
+ restore-keys : |
101
+ ${{ runner.os }}-yarn-
102
+ - run : yarn install --frozen-lockfile --prefer-offline
103
+ - run : yarn compile
104
+ - run : yarn publish
105
+ env :
106
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
0 commit comments