|
| 1 | +# This is a basic workflow to help you get started with Actions |
| 2 | + |
1 | 3 | name: CI |
2 | | -on: [push] |
| 4 | + |
| 5 | +# Controls when the action will run. Triggers the workflow on push or pull request |
| 6 | +# events but only for the master branch |
| 7 | +on: |
| 8 | + push: |
| 9 | + branches: [ master, beta ] |
| 10 | + |
| 11 | +# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
3 | 12 | jobs: |
| 13 | + # This workflow contains a single job called "build" |
4 | 14 | build: |
5 | | - name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }} |
6 | | - |
7 | | - runs-on: ${{ matrix.os }} |
| 15 | + # The type of runner that the job will run on |
| 16 | + runs-on: ubuntu-latest |
8 | 17 | strategy: |
9 | 18 | matrix: |
10 | | - node: ['14.x'] |
11 | | - os: [ubuntu-latest] |
| 19 | + node_version: ['14.x'] |
12 | 20 |
|
| 21 | + # Steps represent a sequence of tasks that will be executed as part of the job |
13 | 22 | steps: |
14 | | - - name: Checkout repo |
15 | | - uses: actions/checkout@v2 |
16 | | - |
17 | | - - name: Use Node ${{ matrix.node }} |
18 | | - uses: actions/setup-node@v1 |
19 | | - with: |
20 | | - node-version: ${{ matrix.node }} |
21 | | - registry-url: 'https://registry.npmjs.org' |
| 23 | + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
| 24 | + - uses: actions/checkout@v2 |
22 | 25 |
|
23 | | - - name: Install deps and build (with cache) |
24 | | - uses: bahmutov/npm-install@v1 |
| 26 | + - name: Install Dependencies |
| 27 | + run: yarn |
25 | 28 |
|
26 | 29 | - name: Lint |
27 | 30 | run: yarn lint |
28 | 31 |
|
29 | 32 | - name: Test |
30 | 33 | run: yarn test --ci --coverage --maxWorkers=2 |
31 | 34 |
|
32 | | - - name: Build |
| 35 | + - name: Install Dependencies |
33 | 36 | run: yarn build |
34 | 37 |
|
35 | | - - name: Publish |
36 | | - run: yarn publish |
| 38 | + - name: Semantic Release |
| 39 | + run: yarn semver |
37 | 40 | env: |
| 41 | + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |
38 | 42 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
| 43 | + |
0 commit comments