Skip to content

Add release.yml workflow to build GraalVM native binaries on tag push #40

@snytkine

Description

@snytkine

Summary

Add .github/workflows/release.yml that triggers automatically when a version tag (e.g. v0.1.1) is pushed, builds GraalVM native binaries for all supported platforms, and attaches them as assets to the GitHub Release.

This workflow is the downstream companion to the release-please workflow: when a Release PR is merged, release-please creates the tag and GitHub Release, then this workflow fires and populates it with native binaries.

Platforms

Runner Asset name
ubuntu-latest api-tester-cli-linux-amd64
macos-latest (Apple Silicon) api-tester-cli-macos-aarch64
macos-13 (Intel) api-tester-cli-macos-amd64
windows-latest api-tester-cli-windows-amd64.exe

All four builds run in parallel (fail-fast: false) so one platform failure does not block the others.

Implementation

Trigger

on:
  push:
    tags:
      - 'v*.*.*'

GraalVM setup

Uses graalvm/setup-graalvm@v1 with distribution: graalvm-community and java-version: '25' to match the project's java.version property in pom.xml.

Build command

./mvnw clean -Pnative native:compile -B

Activates the native Maven profile, which runs spring-boot-maven-plugin:process-aot followed by native-maven-plugin:compile-no-fork.

Asset upload

Uses softprops/action-gh-release@v2 to attach the binary to the release that release-please already created for the tag. Each job renames the platform binary to its asset name before uploading.

Notes

  • permissions: contents: write is required for softprops/action-gh-release to attach assets.
  • The github-token input on graalvm/setup-graalvm avoids GitHub API rate-limit issues when downloading the GraalVM distribution.
  • Native compilation is CPU-intensive and typically takes 5–15 minutes per platform.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions