Skip to content

Fix

Fix #604

Workflow file for this run

name: Build
on:
push:
pull_request:
workflow_dispatch:
release:
types: [published]
jobs:
build:
strategy:
matrix:
include:
- name: "Athena"
runner-image: ubuntu-latest
build-options: "-Ponlylinuxathena"
- name: "Linux"
runner-image: ubuntu-latest
build-options: "-Ponlylinuxx86-64"
- name: "macOS"
runner-image: macos-latest
build-options: "-Ponlyosxuniversal"
- name: "Windows"
runner-image: windows-latest
build-options: "-Ponlywindowsx86-64"
name: "Build for ${{ matrix.name }}"
runs-on: ${{ matrix.runner-image }}
steps:
- name: "Checkout repository"
uses: actions/checkout@v4
- name: "Setup Java"
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "17"
- name: "Install RoboRIO toolchain"
if: ${{ matrix.name }} == 'Athena'
run: ./gradlew :akit:installRoboRioToolchain
- name: "Build and test"
run: ./gradlew :akit:build ${{ matrix.build-options }}
- name: "Development: Publish local"
if: github.event_name != 'release'
run: ./gradlew :akit:publishAllPublicationsToMavenRepository ${{ matrix.build-options }}
- name: "Release: Get version number"
id: get_version
if: github.event_name == 'release'
uses: battila7/get-version-action@v2
- name: "Release: Publish"
if: github.event_name == 'release'
run: ./gradlew :akit:publish -PpublishingVersion=${{ steps.get_version.outputs.version-without-v }} ${{ matrix.build-options }}
- name: "Upload local repo"
uses: actions/upload-artifact@v3
with:
name: maven_${{ matrix.name }}
path: akit/build/repos/releases