Skip to content

Commit 8fc6ee3

Browse files
committed
ci: initial version
1 parent 4e4b38f commit 8fc6ee3

File tree

3 files changed

+65
-0
lines changed

3 files changed

+65
-0
lines changed

.github/workflows/build.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Test
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- "greenkeeper/*"
7+
pull_request:
8+
types: [opened, synchronize]
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@master
15+
- uses: actions/setup-node@v1
16+
with:
17+
node-version: 12
18+
- run: npm ci
19+
- run: npm test

.github/workflows/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
release:
9+
name: release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@master
13+
- uses: actions/setup-node@v1
14+
with:
15+
node-version: "12.x"
16+
- run: npm ci
17+
- run: npm run build
18+
- run: npx semantic-release
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
22+
- run: "git commit index.js index.d.ts -m 'build: index.js & *index.d.ts'
23+
24+
[skip ci]"
25+
- run: "git push https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:refs/heads/master"
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Test
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- "greenkeeper/*"
7+
pull_request:
8+
types: [opened, synchronize]
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@master
15+
- uses: actions/setup-node@v1
16+
with:
17+
node-version: 12
18+
- run: npm ci
19+
- run: npm test

0 commit comments

Comments
 (0)