Release #38
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
name: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Release version' | |
required: true | |
env: | |
JAVA_VERSION: '21' | |
jobs: | |
build: | |
name: 'Build convert on ${{ matrix.os }}' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ ubuntu-latest, macos-latest, macos-13 ] | |
steps: | |
- name: 'Check out repository' | |
uses: actions/checkout@v4 | |
- name: 'Setup GraalVM ${{ env.GRAAL_VERSION }}' | |
uses: graalvm/setup-graalvm@v1 | |
with: | |
distribution: 'graalvm-community' | |
java-version: ${{ env.JAVA_VERSION }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
native-image-job-reports: 'true' | |
native-image-musl: ${{ matrix.os == 'ubuntu-latest' }} | |
cache: 'gradle' | |
- name: 'Check' | |
run: ./gradlew check -Pversion='${{ github.event.inputs.version }}' --no-daemon | |
- name: 'Build native executable' | |
run: ./gradlew nativeCompile -Pversion='${{ github.event.inputs.version }}' --no-daemon | |
- name: 'Compress with UPX' | |
if: ${{ runner.os == 'Linux' }} | |
uses: crazy-max/ghaction-upx@v3 | |
with: | |
version: latest | |
files: | | |
./build/native/nativeCompile/convert | |
args: --best | |
- name: 'Add convert to PATH' | |
run: echo "${{ github.workspace }}/build/native/nativeCompile" >> $GITHUB_PATH | |
- name: 'End to end test' | |
run: ./gradlew e2e --no-daemon | |
- name: 'Generate package' | |
run: ./gradlew generatePackage -Pversion='${{ github.event.inputs.version }}' --no-daemon | |
- name: 'Upload build artifact' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifacts-${{ matrix.os }} | |
path: build/**/*.zip | |
release: | |
name: 'Release convert' | |
needs: [ build ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Check out repository' | |
uses: actions/checkout@v4 | |
- name: 'Download all build artifacts' | |
uses: actions/download-artifact@v4 | |
- name: 'Display structure of downloaded files' | |
run: ls -R | |
- name: 'Release with JReleaser' | |
uses: jreleaser/release-action@v2 | |
with: | |
arguments: full-release | |
env: | |
JRELEASER_PROJECT_VERSION: ${{ github.event.inputs.version }} | |
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
JRELEASER_HOMEBREW_GITHUB_TOKEN: ${{ secrets.JRELEASER_HOMEBREW_GITHUB_TOKEN }} |