Skip to content

Commit dbc18c4

Browse files
committed
chore: hello github actions
1 parent 4ed8f0a commit dbc18c4

File tree

7 files changed

+179
-220
lines changed

7 files changed

+179
-220
lines changed

.circleci/config.yml

Lines changed: 0 additions & 202 deletions
This file was deleted.

.github/actions/init/action.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Init
2+
3+
runs:
4+
using: 'composite'
5+
steps:
6+
- name: Setup Node
7+
uses: actions/setup-node@v2
8+
with:
9+
node-version: '16'
10+
- name: Cache Deps
11+
uses: actions/cache@v2
12+
with:
13+
path: node_modules
14+
key: ${{ runner.os }}-yarn-${{ hashFiles( 'yarn.lock' ) }}
15+
restore-keys: |
16+
${{ runner.os }}-yarn-
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Deploy Nightly
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
7+
defaults:
8+
run:
9+
shell: bash
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
with:
18+
ref: dev
19+
- uses: ./.github/actions/init
20+
- name: Fetch Deps
21+
run: yarn install --frozen-lockfile
22+
- name: Create Nightly Version
23+
run: npm version $(node ./bin/gen-nightly-version.js)
24+
- name: Publish
25+
run: npm publish --tag next
26+
env:
27+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Deploy Release
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
defaults:
9+
run:
10+
shell: bash
11+
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
- uses: ./.github/actions/init
19+
- name: Fetch Deps
20+
run: yarn install --frozen-lockfile
21+
- name: Build
22+
run: yarn build
23+
- name: Publish
24+
run: npm publish
25+
env:
26+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/inspect.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: Inspect
2+
3+
on: push
4+
5+
defaults:
6+
run:
7+
shell: bash
8+
9+
jobs:
10+
fetch:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- uses: ./.github/actions/init
16+
- name: Fetch Deps
17+
run: yarn install --frozen-lockfile
18+
19+
lint:
20+
runs-on: ubuntu-latest
21+
needs: fetch
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v2
25+
- uses: ./.github/actions/init
26+
- name: Lint
27+
run: yarn lint
28+
29+
test:
30+
runs-on: ubuntu-latest
31+
needs: fetch
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v2
35+
- uses: ./.github/actions/init
36+
- name: Lint
37+
run: yarn test --coverage
38+
- name: Upload Coverage
39+
uses: actions/upload-artifact@v2
40+
with:
41+
name: coverage
42+
path: |
43+
coverage/
44+
45+
build:
46+
runs-on: ubuntu-latest
47+
needs: fetch
48+
steps:
49+
- name: Checkout
50+
uses: actions/checkout@v2
51+
- uses: ./.github/actions/init
52+
- name: Build
53+
run: yarn build
54+
- name: Upload Coverage
55+
uses: actions/upload-artifact@v2
56+
with:
57+
name: build
58+
path: |
59+
dist/
60+
ts*/
61+
types/
62+
63+
docs:
64+
runs-on: ubuntu-latest
65+
needs: build
66+
steps:
67+
- name: Checkout
68+
uses: actions/checkout@v2
69+
- uses: ./.github/actions/init
70+
- name: Download Builds
71+
uses: actions/download-artifact@v2
72+
with:
73+
name: build
74+
- name: Build Docs
75+
run: yarn docs
76+
- name: Upload Coverage
77+
uses: actions/upload-artifact@v2
78+
with:
79+
name: docs
80+
path: |
81+
docs/
82+
83+
gh-pages:
84+
runs-on: ubuntu-latest
85+
if: ${{ github.ref == 'refs/heads/release' }}
86+
needs:
87+
- build
88+
- docs
89+
steps:
90+
- name: Checkout
91+
uses: actions/checkout@v2
92+
- uses: ./.github/actions/init
93+
- name: Download Builds
94+
uses: actions/download-artifact@v2
95+
with:
96+
name: build
97+
path: public
98+
- name: Download Docs
99+
uses: actions/download-artifact@v2
100+
with:
101+
name: docs
102+
path: public/docs
103+
- name: Copy Examples
104+
run: |
105+
cp -r examples public/examples
106+
- name: Deploy to gh-pages
107+
uses: peaceiris/actions-gh-pages@v3
108+
with:
109+
github_token: ${{ secrets.GITHUB_TOKEN }}
110+
publish_dir: public
File renamed without changes.

0 commit comments

Comments
 (0)