@@ -24,10 +24,10 @@ jobs:
24
24
25
25
steps :
26
26
- name : Check out Git repository
27
- uses : actions/checkout@v1
27
+ uses : actions/checkout@v3.3.0
28
28
29
29
- name : Install Node.js
30
- uses : actions/setup-node@v1
30
+ uses : actions/setup-node@v3.6.0
31
31
with :
32
32
node-version : 18
33
33
39
39
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"}
40
40
41
41
- name : Restore .cache
42
- uses : actions/cache@v2
42
+ uses : actions/cache@v3.2.4
43
43
id : cache
44
44
with :
45
45
path : ${{ github.workspace }}/.cache
50
50
51
51
- name : Restore node_modules
52
52
id : yarn-cache
53
- uses : actions/cache@v2
53
+ uses : actions/cache@v3.2.4
54
54
with :
55
55
path : node_modules
56
56
key : ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
@@ -84,11 +84,70 @@ jobs:
84
84
# - action artifacts can be downloaded for 90 days, then are removed by github
85
85
# - binaries in PRs from forks won't be signed
86
86
- name : Attach produced packages to Github Action
87
- uses : actions/upload-artifact@v2
87
+ uses : actions/upload-artifact@v3.1.2
88
88
with :
89
89
name : built-on-${{ matrix.os }}
90
90
path : build/ipfs_companion*.*
91
91
if-no-files-found : error
92
92
93
93
- name : Show Cache
94
94
run : du -h ${{ github.workspace }}/.cache/* || true
95
+
96
+ release-pr :
97
+ runs-on : ubuntu-latest
98
+ needs : [test]
99
+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
100
+ steps :
101
+ -
uses :
google-github-actions/[email protected]
102
+ with :
103
+ release-type : node
104
+ package-name : ipfs-companion
105
+ changelog-notes-type : github
106
+ command : release-pr
107
+
108
+ release-assets :
109
+ runs-on : ubuntu-latest
110
+ needs : [test]
111
+ if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
112
+ steps :
113
+ - name : Check out Git repository
114
+
115
+
116
+ - name : Install Node.js
117
+
118
+ with :
119
+ node-version : 18
120
+
121
+ - name : Restore .cache
122
+
123
+ id : cache
124
+ with :
125
+ path : ${{ github.workspace }}/.cache
126
+ key : ${{ runner.os }}-${{ hashFiles('package*json', 'package-lock.json', '*config.js') }}
127
+ restore-keys : |
128
+ ${{ runner.os }}-${{ hashFiles('package*json', 'package-lock.json', '*config.js') }}
129
+ ${{ runner.os }}-
130
+
131
+ - name : Restore node_modules
132
+ id : yarn-cache
133
+
134
+ with :
135
+ path : node_modules
136
+ key : ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
137
+
138
+ - name : Install dependencies
139
+ if : steps.yarn-cache.outputs.cache-hit != 'true'
140
+ run : npm run ci:install
141
+
142
+ - name : Build Stable Release
143
+ run : npm run ci:build:stable
144
+
145
+ - name : Release
146
+ uses : softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
147
+ with :
148
+ files : build/*.zip
149
+ fail_on_unmatched_files : true
150
+ generate_release_notes : true
151
+ draft : true
152
+ append_body : true
153
+ body : ' Automated Release, please upload artifacts to respective webstores and mark this draft as released.'
0 commit comments