-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (51 loc) · 1.37 KB
/
workflow.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
name: main
on: [push]
jobs:
run:
name: run
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: setup-node
uses: actions/setup-node@master
with:
node-version: 12.x
- name: install
run: yarn
- name: format check
run: yarn format --check
- name: lint
run: yarn lint
- name: build
run: yarn build -p tsconfig.prod.json
- name: test
run: yarn test
- name: commitlint
uses: wagoid/[email protected]
- name: setting git values
run: |
git config --local user.email "[email protected]"
git config --local user.name "cdaringe"
- name: release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
if [[ "$GITHUB_REF" = "refs/heads/master" ]]; then
GITHUB_TOKEN=$GH_TOKEN npx semantic-release --verbose
yarn build:demo
else
echo "skipping release on branch $GITHUB_REF"
fi
- name: gh-pages
uses: JamesIves/github-pages-deploy-action@releases/v3
if: github.ref == 'refs/heads/master'
with:
ACCESS_TOKEN: ${{ secrets.GH_TOKEN }}
BASE_BRANCH: master
BRANCH: gh-pages
CLEAN: true
FOLDER: dist