Skip to content

Package AI Client

Package AI Client #43

Workflow file for this run

name: Package AI Client
on:
push:
tags: ['v*']
workflow_dispatch:
inputs:
version:
description: Release version (for example 1.0.0)
required: true
permissions:
contents: write
jobs:
package:
strategy:
fail-fast: false
matrix:
include:
- runtime: win-x64
runner: windows-latest
- runtime: win-arm64
runner: windows-latest
- runtime: osx-x64
runner: macos-latest
- runtime: osx-arm64
runner: macos-latest
- runtime: linux-x64
runner: ubuntu-latest
- runtime: linux-arm64
runner: ubuntu-latest
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v7
- uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x
- name: Install Windows packager
if: runner.os == 'Windows'
shell: pwsh
run: choco install innosetup --yes --no-progress
- name: Build installers
shell: pwsh
run: dotnet run --project ./build -- package-release --runtime "${{ matrix.runtime }}" --version "${{ inputs.version || github.ref_name }}"
- uses: actions/upload-artifact@v7
with:
name: installers-${{ matrix.runtime }}
path: artifacts/release/packages/*
if-no-files-found: error
release:
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
needs: package
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v7
with:
pattern: installers-*
path: artifacts/release-packages
merge-multiple: true
- name: Publish GitHub Release
env:
GH_TOKEN: ${{ github.token }}
INPUT_VERSION: ${{ inputs.version }}
run: |
if [[ "$GITHUB_REF" == refs/tags/v* ]]; then
tag="$GITHUB_REF_NAME"
else
tag="v${INPUT_VERSION#v}"
fi
if gh release view "$tag" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
gh release upload "$tag" artifacts/release-packages/* --repo "$GITHUB_REPOSITORY" --clobber
else
gh release create "$tag" artifacts/release-packages/* --repo "$GITHUB_REPOSITORY" --target "$GITHUB_SHA" --title "$tag" --generate-notes
fi