Skip to content
This repository has been archived by the owner on Jul 13, 2024. It is now read-only.

ci/cd: Linux building attempts #5 #14

ci/cd: Linux building attempts #5

ci/cd: Linux building attempts #5 #14

Workflow file for this run

on:
push:
tags:
- "v*"
jobs:
build:
name: Build pteroctl for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Setup GraalVM on Ubuntu
if: matrix.os == 'ubuntu-latest'
uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-musl: false
- name: Setup GraalVM on Windows
if: matrix.os == 'windows-latest'
uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build with GraalVM
run: |
./gradlew nativeCompile
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: pterocli-${{ matrix.os }}
path: |
build/native/nativeCompile/pterocli
build/native/nativeCompile/pterocli.exe
release:
name: Create pteroctl release
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Collect artifacts
uses: actions/download-artifact@v4
with:
path: artifacts/
- name: Show filesystem
run: ls -R
- name: Release
id: create_release
uses: softprops/action-gh-release@v2
# if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
generate_release_notes: true
fail_on_unmatched_files: true
prerelease: ${{ contains(github.ref, 'RC') }}
files: |
./artifacts/pterocli-ubuntu-latest/pterocli
./artifacts/pterocli-windows-latest/pterocli.exe