This repository has been archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
71 lines (70 loc) · 1.97 KB
/
core.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Core
on:
- push
- pull_request
jobs:
test:
runs-on: ubuntu-latest
name: Test
steps:
- name: Checkout
uses: actions/checkout@v3
- name: NPM Init
uses: ./.github/actions/init-npm
with:
node-version: 18
gh-token: ${{ secrets.GITHUB_TOKEN }}
- name: Sync pkg
run: npm run sync
- name: Build demo
run: npm run build:demo
- name: Test
run: npm run test
env:
CI: 'true'
- name: Upload coverage
if: ${{ runner.os != 'windows-latest' }}
continue-on-error: true
uses: coverallsapp/github-action@v2.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: node-${{ inputs.node-version }}-on-${{ runner.os }}-${{ github.event_name }}
path-to-lcov: ./coverage/ngforage/lcov.info
- name: Test making docs
run: npm run compodoc
release:
name: Release
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
needs:
- test
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1000
- name: Init NPM
uses: ./.github/actions/init-npm
with:
node-version: 18
gh-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v3
name: Reconfig Node
with:
node-version: 18
registry-url: https://registry.npmjs.org
- name: Build demo site
run: npm run build:demo:prod
- name: Build docs
run: npm run compodoc
- name: Release
run: npm run release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Release github pages
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
branch: gh-pages
folder: dist/demo