|
1 | 1 | name: Default CI
|
| 2 | + |
2 | 3 | on:
|
3 | 4 | push:
|
4 | 5 | branches:
|
5 |
| - - master |
| 6 | + - master |
6 | 7 | pull_request:
|
7 | 8 | branches:
|
8 |
| - - '**' |
| 9 | + - '**' |
| 10 | + |
9 | 11 | jobs:
|
10 | 12 | tests:
|
11 | 13 | runs-on: ubuntu-latest
|
12 | 14 | steps:
|
13 |
| - - name: Checkout |
14 |
| - uses: actions/checkout@v3 |
15 |
| - with: |
16 |
| - fetch-depth: 0 |
17 |
| - - name: Setup Nodejs Env |
18 |
| - run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV |
19 |
| - - name: Setup Nodejs |
20 |
| - uses: actions/setup-node@v3 |
21 |
| - with: |
22 |
| - node-version: ${{ env.NODE_VER }} |
23 |
| - - name: Install dependencies |
24 |
| - run: npm ci |
25 |
| - - name: Validate package-lock.json changes |
26 |
| - run: make validate-no-uncommitted-package-lock-changes |
27 |
| - - name: Lint |
28 |
| - run: npm run lint |
29 |
| - - name: Test |
30 |
| - run: npm run test |
31 |
| - - name: Build |
32 |
| - run: npm run build |
33 |
| - - name: i18n_extract |
34 |
| - run: npm run i18n_extract |
35 |
| - - name: Coverage |
36 |
| - uses: codecov/codecov-action@v3 |
| 15 | + - name: Checkout |
| 16 | + uses: actions/checkout@v3 |
| 17 | + with: |
| 18 | + fetch-depth: 0 |
| 19 | + - name: Setup Nodejs Env |
| 20 | + run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV |
| 21 | + - name: Setup Nodejs |
| 22 | + uses: actions/setup-node@v3 |
| 23 | + with: |
| 24 | + node-version: ${{ env.NODE_VER }} |
| 25 | + - name: Install dependencies |
| 26 | + run: npm ci |
| 27 | + - name: Validate package-lock.json changes |
| 28 | + run: make validate-no-uncommitted-package-lock-changes |
| 29 | + - name: Lint |
| 30 | + run: npm run lint |
| 31 | + - name: Test |
| 32 | + run: npm run test |
| 33 | + - name: Build |
| 34 | + run: npm run build |
| 35 | + - name: i18n_extract |
| 36 | + run: npm run i18n_extract |
| 37 | + - name: Coverage |
| 38 | + uses: codecov/codecov-action@v3 |
| 39 | + - name: prep plugins |
| 40 | + run: npm install -D @semantic-release/changelog @semantic-release/git @semantic-release/exec |
| 41 | + - name: Run semantic release |
| 42 | + env: |
| 43 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 44 | + run: npx semantic-release |
| 45 | + id: ver |
| 46 | + outputs: |
| 47 | + output1: ${{ steps.ver.outputs.nextVer }} |
| 48 | + |
| 49 | + print: |
| 50 | + needs: tests |
| 51 | + runs-on: ubuntu-20.04 |
| 52 | + steps: |
| 53 | + - name: Print version |
| 54 | + run: echo ${{ needs.tests.outputs.output1 }} |
0 commit comments