forked from redxtech/vue-plyr
-
Notifications
You must be signed in to change notification settings - Fork 6
55 lines (45 loc) · 1.38 KB
/
examples-node.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Node
on:
pull_request:
push:
branches:
- master
- stable*
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [18, 20]
examples: ["html", "nuxt", "vite", "vue-cli"]
name: examples-build
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Set up node ${{ matrix.node-version }}
uses: actions/setup-node@c2ac33f2c62f978d6c944d9648125a294e56dc0b # v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies and build library
run: |
npm ci
npm run build --if-present
npm pack
- name: Install example dependencies
working-directory: "examples/${{ matrix.examples }}"
run: |
npm ci
version=$(cat ../../package.json | jq --raw-output .version)
npm install -D ../../skjnldsv-vue-plyr-$version.tgz
- name: Build ${{ matrix.examples }} example
working-directory: "examples/${{ matrix.examples }}"
run: npm run build --if-present
summary:
runs-on: ubuntu-latest
needs: build
if: always()
name: examples-summary
steps:
- name: Summary status
run: if ${{ needs.build.result != 'success' && needs.build.result != 'skipped' }}; then exit 1; fi