-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (30 loc) · 905 Bytes
/
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
name: Build, Test and Release
on:
push:
branches: ['**']
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.17.0'
- name: Install dependencies
run: npm ci
- name: Running lint
run: npm run lint
- name: Build
run: npm run build
- name: Test
run: ./run-test.sh
- name: Release
if: startsWith(github.ref_name, 'release/') || github.ref_name == 'main' || github.ref_name == 'develop'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPMJS_TOKEN }}
run: |
npx semantic-release | tee out
echo "RELEASE_VERSION=$(grep 'Created tag ' out | awk -F 'Created tag ' '{print $2}')" >> $GITHUB_ENV