Skip to content

Commit 9167cd8

Browse files
john-urossiam
authored andcommitted
chore: add initial github cd workflow
1 parent 65a6bfb commit 9167cd8

File tree

4 files changed

+8803
-2940
lines changed

4 files changed

+8803
-2940
lines changed

.github/workflows/cd.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CD
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
if: "!contains(github.event.head_commit.message, 'skip ci')"
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: 12.x
20+
- run: npm ci
21+
- name: Release
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.PI_GITHUB_TOKEN }}
24+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
25+
run: npx semantic-release

.github/workflows/ci.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on: [push, pull_request]
44

55
jobs:
66
build:
7+
if: "!contains(github.event.head_commit.message, 'skip ci')"
78

89
runs-on: ubuntu-latest
910

@@ -13,12 +14,12 @@ jobs:
1314
node-version: [10.x, 12.x]
1415

1516
steps:
16-
- uses: actions/checkout@v2
17-
- name: Use Node.js ${{ matrix.node-version }}
18-
uses: actions/setup-node@v1
19-
with:
20-
node-version: ${{ matrix.node-version }}
21-
- run: npm ci
22-
- run: npm run build
23-
- run: npm run lint
24-
- run: npm test
17+
- uses: actions/checkout@v2
18+
- name: Use Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
- run: npm ci
23+
- run: npm run build
24+
- run: npm run lint
25+
- run: npm test

0 commit comments

Comments
 (0)