1
1
name : CI
2
-
3
- on :
2
+ " on " :
4
3
push :
5
4
branches :
6
- - master
7
- pull_request :
8
- branches :
9
- - master
10
- create :
11
- branches :
12
- - master
13
-
5
+ - master
14
6
jobs :
15
- updateKeyword :
7
+ about :
16
8
runs-on : ubuntu-latest
17
9
steps :
18
10
- name : Checkout
19
11
uses : actions/checkout@v2
20
-
21
12
- name : Jaid/action-sync-node-meta
22
13
23
14
with :
24
- direction : overwrite-github # default is overwrite-file
25
- githubToken : ${{ secrets.GITHUB }}
26
-
27
- ci :
15
+ direction : overwrite-github
16
+ githubToken : " ${{ secrets.GITHUB }}"
17
+ release :
28
18
runs-on : ubuntu-latest
29
19
steps :
30
20
- name : Checkout
31
21
uses : actions/checkout@v2
32
-
33
22
- name : Semantic Release
34
23
uses : cycjimmy/semantic-release-action@v2
24
+ id : semantic
35
25
with :
36
- # You can specify specifying version range for the extra plugins if you prefer.
37
26
extra_plugins : |
38
27
@semantic-release/changelog
39
28
@semantic-release/npm
40
29
@semantic-release/git
41
30
@semantic-release/github
42
31
env :
43
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
44
- NPM_TOKEN : ${{ secrets.NPM_TOKEN }} # Auto Changog generator
45
-
46
- docs :
32
+ GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
33
+ NPM_TOKEN : " ${{ secrets.NPM_TOKEN }}"
34
+ outputs :
35
+ new_release_published : " ${{ steps.semantic.outputs.new_release_published }}"
36
+ new_release_version : " ${{ steps.semantic.outputs.new_release_version }}"
37
+ cdn :
47
38
runs-on : ubuntu-latest
39
+ needs : release
40
+ if : needs.release.outputs.new_release_published == 'true'
41
+ env :
42
+ VERSION : " ${{ needs.release.outputs.new_release_version }}"
48
43
steps :
49
44
- name : Checkout
50
45
uses : actions/checkout@v2
51
-
52
- - name : update documentation
53
- uses : CoCreate-app/CoCreate-docs@master
54
-
55
-
56
- cdn :
46
+ - name : setup nodejs
47
+ uses : actions/setup-node@v2
48
+ with :
49
+ node-version : 14.15.4
50
+ - name : yarn install
51
+ run : >
52
+ echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >
53
+ .npmrc
54
+
55
+ yarn install
56
+ - name : yarn build
57
+ run : yarn build
58
+ - name : upload bundle as version
59
+ uses : CoCreate-app/CoCreate-s3@master
60
+ with :
61
+ aws-key-id : " ${{ secrets.AWSACCESSKEYID }}"
62
+ aws-access-key : " ${{ secrets.AWSSECERTACCESSKEY }}"
63
+ bucket : testcrudbucket
64
+ source : ./dist
65
+ destination : " /kanban/${{env.VERSION}}"
66
+ acl : public-read
67
+ - name : upload bundle as latest
68
+ uses : CoCreate-app/CoCreate-s3@master
69
+ with :
70
+ aws-key-id : " ${{ secrets.AWSACCESSKEYID }}"
71
+ aws-access-key : " ${{ secrets.AWSSECERTACCESSKEY }}"
72
+ bucket : testcrudbucket
73
+ source : ./dist
74
+ destination : /kanban/latest
75
+ acl : public-read
76
+
77
+ dist :
57
78
runs-on : ubuntu-latest
58
79
steps :
59
80
- name : Checkout
60
81
uses : actions/checkout@v2
61
-
62
- - name : upload cdn
63
- uses : CoCreate-app/CoCreate-s3@master
64
82
with :
65
- aws-key-id : ${{ secrets.AWSACCESSKEYID }}
66
- aws-access-key : ${{ secrets.AWSSECERTACCESSKEY }}
67
- source : ' ./dist/CoCreate-kanban.min.js'
83
+ GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
84
+ - name : setup nodejs
85
+ uses : actions/setup-node@v2
86
+ with :
87
+ node-version : 14.15.4
88
+ - name : yarn install
89
+ run : >
90
+ echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >
91
+ .npmrc
92
+
93
+ yarn install
94
+ - run : yarn build
95
+ - run : git add .
96
+ -
run :
git config user.email "[email protected] "
97
+ - run : git config user.name "frank pagan"
98
+ - run : git commit --allow-empty -m "add dist bundle"
99
+ - run : git pull origin master
100
+ - run : git commit --allow-empty -m "add dist bundle"
101
+ - run : git push origin master
0 commit comments