Skip to content

Commit 001bf61

Browse files
committed
Setup workflows
1 parent d44fee1 commit 001bf61

File tree

11 files changed

+77
-185
lines changed

11 files changed

+77
-185
lines changed

.circleci/build-demo.sh

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

.circleci/check-tag.sh

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

.circleci/config.yml

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

.circleci/deploy-demo.sh

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

.circleci/export-api-key.sh

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

.circleci/setup-git-user.sh

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

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
github: ngs
2+
issuehunt: ngs/ci2go
3+
custom: https://www.paypal.me/atsnngs

.github/workflows/demo.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Publish demo
2+
on:
3+
push:
4+
branches: [master]
5+
jobs:
6+
publish:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-node@v2-beta
11+
with:
12+
node-version: 12
13+
- run: npm install
14+
- run: npm run build:demo
15+
- name: Deploy
16+
uses: peaceiris/actions-gh-pages@v3
17+
with:
18+
github_token: ${{ secrets.GITHUB_TOKEN }}
19+
publish_dir: ./demo/public
20+
publish_branch: gh-pages
21+

.github/workflows/publish.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Publish to npm
2+
on:
3+
push:
4+
tags:
5+
- v[0-9].[0-9]+.[0-9]+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-node@v2-beta
12+
with:
13+
node-version: 12
14+
- name: Check tag version
15+
run: |
16+
VERSION=$(npm show . version)
17+
if [ "refs/tags/v${VERSION}" != $GITHUB_REF ]; then
18+
echo "Ref ${GITHUB_REF} not match"
19+
exit 1
20+
fi
21+
- run: npm install
22+
- run: npm publish
23+
env:
24+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Run tests
2+
on: [push, pull_request]
3+
jobs:
4+
test:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v2
8+
- uses: actions/setup-node@v2-beta
9+
with:
10+
node-version: 12
11+
- run: npm install
12+
- uses: a-b-r-o-w-n/eslint-action@v1
13+
with:
14+
repo-token: ${{ secrets.GITHUB_TOKEN }}
15+
- run: npm test
16+
- uses: coverallsapp/github-action@master
17+
with:
18+
github-token: ${{ secrets.GITHUB_TOKEN }}
19+
- uses: actions/upload-artifact@v2
20+
with:
21+
path: lib
22+
- uses: actions/upload-artifact@v2
23+
with:
24+
path: coverage

0 commit comments

Comments
 (0)