Skip to content
This repository was archived by the owner on Sep 19, 2025. It is now read-only.

Commit 8a48b97

Browse files
authored
Merge pull request #269 from google/actions-updates
Update build action to address warnings
2 parents c415304 + a80c7fb commit 8a48b97

File tree

1 file changed

+22
-26
lines changed

1 file changed

+22
-26
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,12 @@ jobs:
4242
git pull https://github.com/google/closure-compiler.git master
4343
git log -1 | cat
4444
- name: Get yarn cache directory path
45-
id: yarn-cache-dir-path
46-
run: echo "::set-output name=dir::$(yarn cache dir)"
45+
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
4746
- name: Yarn and maven cache
4847
uses: actions/cache@v3
4948
with:
5049
path: |
51-
${{ steps.yarn-cache-dir-path.outputs.dir }}
50+
${{ env.yarn_cache_dir }}
5251
~/.m2/repository
5352
key: ${{ runner.os }}-yarn-mvn-java11-${{ hashFiles('**/yarn.lock', '**/pom.xml') }}
5453
- name: Install packages
@@ -102,23 +101,22 @@ jobs:
102101
tar -xf upx-$UPX_VERSION-amd64_linux.tar.xz
103102
mv ./upx-$UPX_VERSION-amd64_linux/upx /usr/local/bin/upx
104103
- name: Download compiler jar
105-
uses: actions/download-artifact@v2
104+
uses: actions/download-artifact@v3
106105
with:
107106
name: Compiler.jar
108107
path: packages/google-closure-compiler-java/
109108
- name: Download contrib folder
110-
uses: actions/download-artifact@v2
109+
uses: actions/download-artifact@v3
111110
with:
112111
name: Contrib folder
113112
path: packages/google-closure-compiler/contrib
114113
- name: Get yarn cache directory path
115-
id: yarn-cache-dir-path
116-
run: echo "::set-output name=dir::$(yarn cache dir)"
114+
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
117115
- name: Cache yarn
118116
uses: actions/cache@v3
119117
id: yarn-cache
120118
with:
121-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
119+
path: ${{ env.yarn_cache_dir }}
122120
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
123121
restore-keys: |
124122
${{ runner.os }}-yarn-
@@ -168,23 +166,22 @@ jobs:
168166
- name: Install upx
169167
run: brew install upx
170168
- name: Download compiler jar
171-
uses: actions/download-artifact@v2
169+
uses: actions/download-artifact@v3
172170
with:
173171
name: Compiler.jar
174172
path: packages/google-closure-compiler-java/
175173
- name: Download contrib folder
176-
uses: actions/download-artifact@v2
174+
uses: actions/download-artifact@v3
177175
with:
178176
name: Contrib folder
179177
path: packages/google-closure-compiler/contrib
180178
- name: Get yarn cache directory path
181-
id: yarn-cache-dir-path
182-
run: echo "::set-output name=dir::$(yarn cache dir)"
179+
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
183180
- name: Cache yarn
184181
uses: actions/cache@v3
185182
id: yarn-cache
186183
with:
187-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
184+
path: ${{ env.yarn_cache_dir }}
188185
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
189186
restore-keys: |
190187
${{ runner.os }}-yarn-
@@ -232,23 +229,23 @@ jobs:
232229
components: 'native-image'
233230
github-token: ${{ secrets.GITHUB_TOKEN }}
234231
- name: Download compiler jar
235-
uses: actions/download-artifact@v2
232+
uses: actions/download-artifact@v3
236233
with:
237234
name: Compiler.jar
238235
path: packages/google-closure-compiler-java/
239236
- name: Download contrib folder
240-
uses: actions/download-artifact@v2
237+
uses: actions/download-artifact@v3
241238
with:
242239
name: Contrib folder
243240
path: packages/google-closure-compiler/contrib
244241
- name: Get yarn cache directory path
245-
id: yarn-cache-dir-path
246-
run: echo "::set-output name=dir::$(yarn cache dir)"
242+
# See https://stackoverflow.com/a/66737579/1211524
243+
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $env:GITHUB_ENV
247244
- name: Cache yarn
248245
uses: actions/cache@v3
249246
id: yarn-cache
250247
with:
251-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
248+
path: ${{ env.yarn_cache_dir }}
252249
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
253250
restore-keys: |
254251
${{ runner.os }}-yarn-
@@ -292,27 +289,27 @@ jobs:
292289
node-version: ${{ env.NODE_VERSION }}
293290
registry-url: https://registry.npmjs.org/
294291
- name: Download compiler jar
295-
uses: actions/download-artifact@v2
292+
uses: actions/download-artifact@v3
296293
with:
297294
name: Compiler.jar
298295
path: packages/google-closure-compiler-java/
299296
- name: Download Linux image
300-
uses: actions/download-artifact@v2
297+
uses: actions/download-artifact@v3
301298
with:
302299
name: Linux image
303300
path: packages/google-closure-compiler-linux/
304301
- name: Download MacOS image
305-
uses: actions/download-artifact@v2
302+
uses: actions/download-artifact@v3
306303
with:
307304
name: MacOS image
308305
path: packages/google-closure-compiler-osx/
309306
- name: Download Windows image
310-
uses: actions/download-artifact@v2
307+
uses: actions/download-artifact@v3
311308
with:
312309
name: Windows image
313310
path: packages/google-closure-compiler-windows/
314311
- name: Download contrib folder
315-
uses: actions/download-artifact@v2
312+
uses: actions/download-artifact@v3
316313
with:
317314
name: Contrib folder
318315
path: packages/google-closure-compiler/contrib
@@ -322,13 +319,12 @@ jobs:
322319
chmod 755 packages/google-closure-compiler-osx/compiler
323320
chmod 755 packages/google-closure-compiler-windows/compiler.exe
324321
- name: Get yarn cache directory path
325-
id: yarn-cache-dir-path
326-
run: echo "::set-output name=dir::$(yarn cache dir)"
322+
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
327323
- name: Cache yarn
328324
uses: actions/cache@v3
329325
id: yarn-cache
330326
with:
331-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
327+
path: ${{ env.yarn_cache_dir }}
332328
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
333329
restore-keys: |
334330
${{ runner.os }}-yarn-

0 commit comments

Comments
 (0)