Skip to content

Commit 38b83c6

Browse files
committed
CI action
1 parent a5f2a85 commit 38b83c6

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/ci.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Continuous Integration
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- 'master'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- uses: actions/setup-node@v2
15+
with:
16+
node-version: 20
17+
18+
- name: Get yarn cache directory path
19+
id: yarn-cache-dir-path
20+
run: echo "::set-output name=dir::$(yarn cache dir)"
21+
22+
- uses: actions/cache@v1
23+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
24+
with:
25+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
26+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
27+
restore-keys: |
28+
${{ runner.os }}-yarn-
29+
30+
- name: Install dependencies
31+
run: yarn install --frozen-lockfile
32+
33+
- name: Test the application
34+
run: yarn test
35+
36+
- name: Build the application
37+
run: yarn build
38+
39+
- name: Build the package
40+
run: |
41+
npm pack ./dist/zxing-scanner
42+
mv zxing-ngx-scanner-*.tgz ./package.tgz

0 commit comments

Comments
 (0)