Skip to content

Commit aa7d00c

Browse files
author
KoLiBer
committed
feat: add new Github Action based CI/CD pipelines
1 parent 2cecc79 commit aa7d00c

9 files changed

+1742
-1830
lines changed

.github/.releaserc.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
tagFormat: "${version}"
2+
branches:
3+
- "+([0-9])?(.{+([0-9]),x}).x"
4+
- { name: "master", prerelease: false }
5+
- { name: "next", prerelease: true, channel: "next" }
6+
plugins:
7+
- "@semantic-release/commit-analyzer"
8+
- "@semantic-release/release-notes-generator"
9+
- "@semantic-release/changelog"
10+
- "@semantic-release/npm"
11+
- - "@semantic-release/git"
12+
- message: "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}"
13+
assets:
14+
- CHANGELOG.md
15+
- package.json
16+
- package-lock.json
17+
- - "@saithodev/semantic-release-backmerge"
18+
- branchName: next

.github/workflows/release.yml

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- "+([0-9])?(.{+([0-9]),x}).x"
7+
- master
8+
- next
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/cache@v2
16+
with:
17+
path: node_modules/
18+
key: ${{ hashFiles('package-lock.json') }}
19+
- uses: actions/cache@v2
20+
with:
21+
path: dist/
22+
key: ${{ github.sha }}
23+
- uses: actions/setup-node@v2
24+
with:
25+
node-version: "14"
26+
27+
- run: npm ci
28+
- run: npm run build
29+
30+
test:
31+
needs: build
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v2
35+
- uses: actions/cache@v2
36+
with:
37+
path: node_modules/
38+
key: ${{ hashFiles('package-lock.json') }}
39+
- uses: actions/setup-node@v2
40+
with:
41+
node-version: "14"
42+
43+
- run: npm run test
44+
45+
release:
46+
needs: test
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v2
50+
- uses: actions/cache@v2
51+
with:
52+
path: dist/
53+
key: ${{ github.sha }}
54+
- uses: actions/setup-node@v2
55+
with:
56+
node-version: "14"
57+
58+
- run: cp .github/.releaserc.yml .
59+
- run: |
60+
npm i -g semantic-release \
61+
@semantic-release/git \
62+
@semantic-release/npm \
63+
@semantic-release/changelog \
64+
@saithodev/semantic-release-backmerge
65+
- run: npx semantic-release
66+
env:
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/request.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Request
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "+([0-9])?(.{+([0-9]),x}).x"
7+
- next
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/cache@v2
15+
with:
16+
path: node_modules/
17+
key: ${{ hashFiles('package-lock.json') }}
18+
- uses: actions/cache@v2
19+
with:
20+
path: dist/
21+
key: ${{ github.sha }}
22+
- uses: actions/setup-node@v2
23+
with:
24+
node-version: "14"
25+
26+
- run: npm ci
27+
- run: npm run build
28+
29+
test:
30+
needs: build
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v2
34+
- uses: actions/cache@v2
35+
with:
36+
path: node_modules/
37+
key: ${{ hashFiles('package-lock.json') }}
38+
- uses: actions/setup-node@v2
39+
with:
40+
node-version: "14"
41+
42+
- run: npm run test

.mocharc.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"exit": true,
23
"recursive": true,
34
"require": "ts-node/register"
45
}

.travis.yml

-14
This file was deleted.

CHANGELOG.md

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Changelog
2-
31
## v1.1.0
42

53
- **Feat**: add `context` to options and pass into `InvocationContext`

0 commit comments

Comments
 (0)