-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #305 from google/update-actions
Update github actions versions
- Loading branch information
Showing
4 changed files
with
78 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,15 +20,22 @@ jobs: | |
FORCE_COLOR: '1' | ||
steps: | ||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: adopt-hotspot | ||
java-version: 17 | ||
java-version: 21 | ||
java-package: jdk | ||
architecture: x64 | ||
- name: Setup Bazelisk | ||
uses: bazelbuild/setup-bazelisk@v2 | ||
- uses: actions/checkout@v3 | ||
uses: bazel-contrib/[email protected] | ||
with: | ||
# Avoid downloading Bazel every time. | ||
bazelisk-cache: true | ||
# Store build cache per workflow. | ||
disk-cache: ${{ github.workflow }} | ||
# Share repository cache between workflows. | ||
repository-cache: true | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Fetch submodule tags | ||
|
@@ -44,7 +51,7 @@ jobs: | |
- name: Get yarn cache directory path | ||
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV | ||
- name: Yarn and maven cache | ||
uses: actions/cache@v3 | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
${{ env.yarn_cache_dir }} | ||
|
@@ -57,12 +64,12 @@ jobs: | |
- name: Tests | ||
run: node_modules/.bin/mocha --colors | ||
- name: Upload contrib folder | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Contrib folder | ||
path: compiler/contrib | ||
- name: Upload compiler jar | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Compiler.jar | ||
path: packages/google-closure-compiler-java/compiler.jar | ||
|
@@ -75,47 +82,47 @@ jobs: | |
needs: build-compiler | ||
runs-on: ubuntu-20.04 | ||
env: | ||
NODE_VERSION: '14.x' | ||
NODE_VERSION: '18.x' | ||
FORCE_COLOR: '1' | ||
steps: | ||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: adopt-hotspot | ||
java-version: 17 | ||
java-version: 21 | ||
java-package: jdk | ||
architecture: x64 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ env.NODE_VERSION }} | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- uses: graalvm/setup-graalvm@v1 | ||
with: | ||
version: '22.3.2' | ||
java-version: '17' | ||
components: 'native-image' | ||
java-version: 21 | ||
distribution: 'graalvm-community' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
native-image-job-reports: 'true' | ||
- name: Setup upx | ||
run: | | ||
UPX_VERSION=3.96 | ||
curl --fail --show-error --location --remote-name "https://github.com/upx/upx/releases/download/v$UPX_VERSION/upx-$UPX_VERSION-amd64_linux.tar.xz" | ||
tar -xf upx-$UPX_VERSION-amd64_linux.tar.xz | ||
mv ./upx-$UPX_VERSION-amd64_linux/upx /usr/local/bin/upx | ||
- name: Download compiler jar | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: Compiler.jar | ||
path: packages/google-closure-compiler-java/ | ||
- name: Download contrib folder | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: Contrib folder | ||
path: packages/google-closure-compiler/contrib | ||
- name: Get yarn cache directory path | ||
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV | ||
- name: Cache yarn | ||
uses: actions/cache@v3 | ||
uses: actions/cache@v4 | ||
id: yarn-cache | ||
with: | ||
path: ${{ env.yarn_cache_dir }} | ||
|
@@ -133,7 +140,7 @@ jobs: | |
- name: Tests | ||
run: yarn workspaces run test --colors | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Linux image | ||
path: packages/google-closure-compiler-linux/compiler | ||
|
@@ -144,44 +151,44 @@ jobs: | |
needs: build-compiler | ||
runs-on: macos-latest | ||
env: | ||
NODE_VERSION: '16.x' | ||
NODE_VERSION: '20.x' | ||
FORCE_COLOR: '1' | ||
steps: | ||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: adopt-hotspot | ||
java-version: 17 | ||
java-version: 21 | ||
java-package: jdk | ||
architecture: x64 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ env.NODE_VERSION }} | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- uses: graalvm/setup-graalvm@v1 | ||
with: | ||
version: '22.3.2' | ||
java-version: '17' | ||
components: 'native-image' | ||
java-version: 21 | ||
distribution: 'graalvm-community' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
native-image-job-reports: 'true' | ||
# # See https://github.com/google/closure-compiler-npm/issues/265 | ||
# - name: Install upx | ||
# run: brew install upx | ||
- name: Download compiler jar | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: Compiler.jar | ||
path: packages/google-closure-compiler-java/ | ||
- name: Download contrib folder | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: Contrib folder | ||
path: packages/google-closure-compiler/contrib | ||
- name: Get yarn cache directory path | ||
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV | ||
- name: Cache yarn | ||
uses: actions/cache@v3 | ||
uses: actions/cache@v4 | ||
id: yarn-cache | ||
with: | ||
path: ${{ env.yarn_cache_dir }} | ||
|
@@ -199,7 +206,7 @@ jobs: | |
- name: Tests | ||
run: yarn workspaces run test --colors | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: MacOS image | ||
path: packages/google-closure-compiler-osx/compiler | ||
|
@@ -210,42 +217,42 @@ jobs: | |
needs: build-compiler | ||
runs-on: windows-latest | ||
env: | ||
NODE_VERSION: '18.x' | ||
NODE_VERSION: '20.x' | ||
FORCE_COLOR: '1' | ||
steps: | ||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: adopt-hotspot | ||
java-version: 17 | ||
java-version: 21 | ||
java-package: jdk | ||
architecture: x64 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ env.NODE_VERSION }} | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- uses: graalvm/setup-graalvm@v1 | ||
with: | ||
version: '22.3.2' | ||
java-version: '17' | ||
components: 'native-image' | ||
java-version: 21 | ||
distribution: 'graalvm-community' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
native-image-job-reports: 'true' | ||
- name: Download compiler jar | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: Compiler.jar | ||
path: packages/google-closure-compiler-java/ | ||
- name: Download contrib folder | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: Contrib folder | ||
path: packages/google-closure-compiler/contrib | ||
- name: Get yarn cache directory path | ||
# See https://stackoverflow.com/a/66737579/1211524 | ||
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $env:GITHUB_ENV | ||
- name: Cache yarn | ||
uses: actions/cache@v3 | ||
uses: actions/cache@v4 | ||
id: yarn-cache | ||
with: | ||
path: ${{ env.yarn_cache_dir }} | ||
|
@@ -265,7 +272,7 @@ jobs: | |
echo "Running Tests" | ||
yarn workspaces run test --colors | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Windows image | ||
path: packages/google-closure-compiler-windows/compiler.exe | ||
|
@@ -276,7 +283,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
if: ${{ github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} | ||
env: | ||
NODE_VERSION: '18.x' | ||
NODE_VERSION: '20.x' | ||
COMPILER_NIGHTLY: ${{ github.event_name == 'schedule' }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_AUTH_TOKEN }} | ||
FORCE_COLOR: '1' | ||
|
@@ -285,34 +292,34 @@ jobs: | |
- build-macos | ||
- build-windows | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ env.NODE_VERSION }} | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
registry-url: https://registry.npmjs.org/ | ||
- name: Download compiler jar | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: Compiler.jar | ||
path: packages/google-closure-compiler-java/ | ||
- name: Download Linux image | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: Linux image | ||
path: packages/google-closure-compiler-linux/ | ||
- name: Download MacOS image | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: MacOS image | ||
path: packages/google-closure-compiler-osx/ | ||
- name: Download Windows image | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: Windows image | ||
path: packages/google-closure-compiler-windows/ | ||
- name: Download contrib folder | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: Contrib folder | ||
path: packages/google-closure-compiler/contrib | ||
|
@@ -324,7 +331,7 @@ jobs: | |
- name: Get yarn cache directory path | ||
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV | ||
- name: Cache yarn | ||
uses: actions/cache@v3 | ||
uses: actions/cache@v4 | ||
id: yarn-cache | ||
with: | ||
path: ${{ env.yarn_cache_dir }} | ||
|
@@ -344,4 +351,4 @@ jobs: | |
- name: Configure yarn | ||
run: yarn config set registry https://registry.npmjs.org/ | ||
- name: Publish packages to npm | ||
run: yarn publish-packages | ||
run: yarn publish-packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters