Release using matrix builder because we need CGO for tree-sitter #2
Workflow file for this run
This file contains 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: Release llmcat | |
on: | |
push: | |
tags: | |
- 'v*' | |
permissions: | |
contents: write | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
targets: linux | |
setup_cmd: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu | |
- os: macos-latest | |
targets: darwin | |
setup_cmd: "" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21' | |
- name: Setup cross-compilation | |
run: ${{ matrix.setup_cmd }} | |
- name: Build binaries | |
run: | | |
OS=${{ matrix.targets }} | |
# Build for both architectures using make | |
make bin/$OS/amd64/llmcat | |
make bin/$OS/arm64/llmcat | |
# Rename for release | |
cd bin | |
for arch in amd64 arm64; do | |
mv $OS/$arch/llmcat llmcat-$OS-$arch | |
done | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: binaries-${{ matrix.targets }} | |
path: bin/llmcat-* | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download all artifacts | |
uses: actions/download-artifact@v4 | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
generate_release_notes: true | |
files: | | |
binaries-*/llmcat-* |