Skip to content

update google-java-format #51

update google-java-format

update google-java-format #51

Workflow file for this run

name: GraalVM Native Image builds
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
build:
name: Java-format-service on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
file_ext: ""
arch: _linux-amd64
- os: windows-latest
file_ext: ".exe"
arch: _win32-amd64
# - os: macos-latest
# file_ext: ""
# arch: darwin-aarch64
steps:
- uses: actions/checkout@v4
- uses: graalvm/setup-graalvm@v1
with:
java-version: '17'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
- name: Build
run: |
mvn -Pnative clean package
# - name: Windows rename
# shell: powershell
# if: ${{ matrix.os == 'windows-latest' }}
# run: |
# ren .\target\java-format-service${{ matrix.file_ext }} java-format-service${{ matrix.arch }}${{ matrix.file_ext }}
- name: Upx
uses: crazy-max/ghaction-upx@v3
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
version: latest
files: |
target/java-format-service${{ matrix.file_ext }}
args: -otarget/java-format-service${{ matrix.arch }}${{ matrix.file_ext }}
- name: Upx windows
uses: crazy-max/ghaction-upx@v3
if: ${{ matrix.os == 'windows-latest' }}
with:
version: latest
files: |
target/java-format-service${{ matrix.file_ext }}
args: -4 -otarget/java-format-service${{ matrix.arch }}${{ matrix.file_ext }}
- name: Cert
if: ${{ matrix.os == 'windows-latest' }}
uses: dlemstra/code-sign-action@v1
with:
certificate: '${{ secrets.CERTIFICATE }}'
password: '${{ secrets.CERTIFICATE_PASSWORD }}'
folder: 'target'
recursive: true
files: |
java-format-service${{ matrix.arch }}${{ matrix.file_ext }}
- name: Publish
uses: softprops/action-gh-release@v2
with:
files: |
target/java-format-service${{ matrix.arch }}${{ matrix.file_ext }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish jar
uses: softprops/action-gh-release@v1
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
files: |
target/java-format-service.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}