Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate native-image binaries for google-java-format #1057

Merged
merged 4 commits into from
Feb 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
env:
SUFFIX: ${{fromJson('{"ubuntu-latest":"linux-x86_64", "macos-latest":"darwin-arm64", "windows-latest":"windows_x86-64"}')[matrix.os]}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fancy!! That's a really neat trick - TIL; Thank You!

cushon marked this conversation as resolved.
Show resolved Hide resolved
steps:
- name: "Check out repository"
uses: actions/checkout@v4
Expand All @@ -101,9 +103,9 @@ jobs:
- name: "Native"
run: mvn -Pnative -DskipTests package -pl core -am
- name: "Move outputs"
run: cp core/target/google-java-format google-java-format-${{ matrix.os == 'ubuntu-latest' && 'linux' || 'darwin' }}
run: cp core/target/google-java-format google-java-format-${{ env.SUFFIX }}
cushon marked this conversation as resolved.
Show resolved Hide resolved
- name: "Upload native-image"
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: gh release upload "v${{ github.event.inputs.version }}" "google-java-format-${{ matrix.os == 'ubuntu-latest' && 'linux' || 'darwin' }}"
run: gh release upload "v${{ github.event.inputs.version }}" "google-java-format-${{ env.SUFFIX }}"
cushon marked this conversation as resolved.
Show resolved Hide resolved
Loading