File tree Expand file tree Collapse file tree 5 files changed +80
-53
lines changed Expand file tree Collapse file tree 5 files changed +80
-53
lines changed Original file line number Diff line number Diff line change 5
5
workflow_dispatch :
6
6
jobs :
7
7
build :
8
- name : Build files
9
- runs-on : ubuntu-18.04
8
+ name : Build and Commit
9
+ runs-on : ubuntu-latest
10
10
if : " !contains(github.event.head_commit.message, '[skip ci]')"
11
11
steps :
12
12
- name : Checkout
13
- uses : actions/checkout@v2.3.4
14
- with :
15
- ref : ${{ github.head_ref }}
16
- token : ${{ secrets.GH_PAT }}
13
+ uses : actions/checkout@v2
17
14
- name : Setup Node.js
18
- uses : actions/setup-node@v2.1.4
15
+ uses : actions/setup-node@v2
19
16
with :
20
17
node-version : 14
21
18
- name : Cache node modules
22
- uses : actions/cache@v2
23
- env :
24
- cache-name : cache-node-modules
25
- with :
26
- path : ~/.npm
27
- key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
28
- restore-keys : |
29
- ${{ runner.os }}-build-${{ env.cache-name }}-
30
- ${{ runner.os }}-build-
31
- ${{ runner.os }}-
19
+ uses : c-hive/gha-npm-cache@v1
32
20
- name : Install dependencies
33
21
run : npm ci
34
- - name : Build TypeScript
22
+ - name : Run build command
35
23
run : npm run build
36
24
- name : Commit build
37
- uses : stefanzweifel/git-auto-commit-action@v4.9.2
25
+ uses : stefanzweifel/git-auto-commit-action@v4.8.0
38
26
with :
39
27
commit_message : " :rocket: Deploy new version [skip ci]"
40
28
commit_user_name : BetaHuhn Bot
41
29
commit_user_email : bot@mxis.ch
42
30
commit_author : BetaHuhn Bot <bot@mxis.ch>
43
31
upload :
44
- needs : build
32
+ needs : [ build]
45
33
name : Upload to CDN
46
34
runs-on : ubuntu-latest
47
35
steps :
Original file line number Diff line number Diff line change
1
+ name : Tag CI
2
+ on :
3
+ release :
4
+ types : [published, edited]
5
+ jobs :
6
+ latest :
7
+ name : Latest
8
+ runs-on : windows-latest
9
+ steps :
10
+ - name : Update latest tag
11
+ uses : Actions-R-Us/actions-tagger@latest
12
+ env :
13
+ GITHUB_TOKEN : " ${{ secrets.GH_PAT }}"
14
+ with :
15
+ publish_latest_tag : true
Original file line number Diff line number Diff line change 1
- name : Lint CI
1
+ name : Node CI
2
2
on :
3
3
push :
4
4
branches-ignore :
23
23
- name : Install dependencies
24
24
run : npm ci
25
25
- name : Run lint command
26
- run : npm run lint
26
+ run : npm run lint
27
+ build :
28
+ name : Build
29
+ runs-on : ubuntu-latest
30
+ if : " !contains(github.event.head_commit.message, '[skip ci]')"
31
+ steps :
32
+ - name : Checkout
33
+ uses : actions/checkout@v2
34
+ - name : Setup Node.js
35
+ uses : actions/setup-node@v2
36
+ with :
37
+ node-version : 14
38
+ - name : Cache node modules
39
+ uses : c-hive/gha-npm-cache@v1
40
+ - name : Install dependencies
41
+ run : npm ci
42
+ - name : Run build command
43
+ run : npm run build
Original file line number Diff line number Diff line change 4
4
branches :
5
5
- master
6
6
jobs :
7
- release :
8
- name : Build, lint and release
9
- runs-on : ubuntu-18.04
7
+ lint :
8
+ name : Lint
9
+ runs-on : ubuntu-latest
10
10
if : " !contains(github.event.head_commit.message, '[skip ci]')"
11
11
steps :
12
12
- name : Checkout
@@ -19,11 +19,42 @@ jobs:
19
19
uses : c-hive/gha-npm-cache@v1
20
20
- name : Install dependencies
21
21
run : npm ci
22
- - name : Build TypeScript
23
- run : npm run build
24
- - name : Run linter
22
+ - name : Run lint command
25
23
run : npm run lint
26
- - name : Release
24
+ build :
25
+ name : Build
26
+ runs-on : ubuntu-latest
27
+ if : " !contains(github.event.head_commit.message, '[skip ci]')"
28
+ steps :
29
+ - name : Checkout
30
+ uses : actions/checkout@v2
31
+ - name : Setup Node.js
32
+ uses : actions/setup-node@v2
33
+ with :
34
+ node-version : 14
35
+ - name : Cache node modules
36
+ uses : c-hive/gha-npm-cache@v1
37
+ - name : Install dependencies
38
+ run : npm ci
39
+ - name : Run build command
40
+ run : npm run build
41
+ release :
42
+ needs : [lint, build]
43
+ name : Release
44
+ runs-on : ubuntu-latest
45
+ if : " !contains(github.event.head_commit.message, '[skip ci]')"
46
+ steps :
47
+ - name : Checkout
48
+ uses : actions/checkout@v2
49
+ - name : Setup Node.js
50
+ uses : actions/setup-node@v2
51
+ with :
52
+ node-version : 14
53
+ - name : Cache node modules
54
+ uses : c-hive/gha-npm-cache@v1
55
+ - name : Install dependencies
56
+ run : npm ci
57
+ - name : Run Semantic Release
27
58
run : npx semantic-release
28
59
env :
29
60
GITHUB_TOKEN : ${{ secrets.GH_PAT }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments