-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (60 loc) · 1.6 KB
/
code.yaml
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
52
53
54
55
56
57
58
59
60
61
62
name: "code"
on:
push:
branches:
- "master"
paths:
- ".github/workflows/code.yaml"
- ".github/workflows/publish.yaml"
- "package.json"
- "lib/**"
- "README.md"
- "src/**"
- "test/*"
- "tsconfig.json"
- "tslint.json"
pull_request:
paths:
- ".github/workflows/code.yaml"
- ".github/workflows/publish.yaml"
- "package.json"
- "lib/**"
- "README.md"
- "src/**"
- "test/*"
- "tsconfig.json"
- "tslint.json"
jobs:
test:
name: lint, test and build
runs-on: ubuntu-latest
steps:
- name: Checkout git repository
uses: actions/[email protected]
- name: Install yarn dependencies
run: yarn install --frozen-lockfile
- name: Lint code
run: yarn lint
- name: Test code
run: yarn test
- name: Build code
run: yarn build
release:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout git repository
uses: actions/[email protected]
- name: Clean old release drafts
run: hub release -f "%T (%S) %n" --include-drafts | grep " (draft)" | awk '{print $1}' | xargs --no-run-if-empty -t -n1 hub release delete
env:
GITHUB_USER: minddocbot
GITHUB_TOKEN: ${{ secrets.MINDDOCBOT_TOKEN }}
- name: Create release
uses: minddocdev/mou-release-action@master
with:
draft: true
prerelease: false
templatePath: RELEASE_DRAFT/default.md
token: ${{ secrets.MINDDOCBOT_TOKEN }}