fix: remove gu install native-image (bundled in GraalVM 21 distribution) #10
Workflow file for this run
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ['[0-9]*.[0-9]*.[0-9]*'] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| - name: Build, unit tests + integration tests | |
| run: mvn -B verify | |
| native: | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/') | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| label: linux-amd64 | |
| binary: qtsurfer-mcp | |
| asset: qtsurfer-mcp-linux-amd64 | |
| - os: macos-13 | |
| label: macos-amd64 | |
| binary: qtsurfer-mcp | |
| asset: qtsurfer-mcp-macos-amd64 | |
| - os: macos-latest | |
| label: macos-arm64 | |
| binary: qtsurfer-mcp | |
| asset: qtsurfer-mcp-macos-arm64 | |
| - os: windows-latest | |
| label: windows-amd64 | |
| binary: qtsurfer-mcp.exe | |
| asset: qtsurfer-mcp-windows-amd64.exe | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'graalvm' | |
| cache: 'maven' | |
| - name: Build native binary | |
| run: mvn -B -Pnative -DskipTests package native:compile-no-fork | |
| - name: Upload native binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.asset }} | |
| path: target/${{ matrix.binary }} | |
| retention-days: 1 | |
| release: | |
| needs: [build, native] | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| - name: Build fat JAR | |
| run: mvn -B package -DskipTests | |
| - name: Download native binaries | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: native-binaries | |
| - name: Create GitHub Release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| awk "/^## \[${GITHUB_REF_NAME}\]/{found=1; next} found && /^## \[/{exit} found{print}" \ | |
| CHANGELOG.md > /tmp/release-notes.md | |
| JAR=$(ls target/mcp-*.jar | grep -v 'original-' | head -1) | |
| gh release create "$GITHUB_REF_NAME" \ | |
| --title "$GITHUB_REF_NAME" \ | |
| --notes-file /tmp/release-notes.md \ | |
| "$JAR#qtsurfer-mcp-java-${GITHUB_REF_NAME}.jar" \ | |
| "native-binaries/qtsurfer-mcp-linux-amd64/qtsurfer-mcp#qtsurfer-mcp-linux-amd64" \ | |
| "native-binaries/qtsurfer-mcp-macos-amd64/qtsurfer-mcp#qtsurfer-mcp-macos-amd64" \ | |
| "native-binaries/qtsurfer-mcp-macos-arm64/qtsurfer-mcp#qtsurfer-mcp-macos-arm64" \ | |
| "native-binaries/qtsurfer-mcp-windows-amd64.exe/qtsurfer-mcp.exe#qtsurfer-mcp-windows-amd64.exe" |