Added some more options and optimized output for my tastes #9
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 Build | |
on: | |
push: | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- os: darwin | |
arch: amd64 | |
suffix: mac-amd64 | |
- os: darwin | |
arch: arm64 | |
suffix: mac-arm64 | |
- os: windows | |
arch: amd64 | |
suffix: windows-amd64 | |
- os: linux | |
arch: amd64 | |
suffix: linux-amd64 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- name: Build | |
env: | |
GOOS: ${{ matrix.os }} | |
GOARCH: ${{ matrix.arch }} | |
run: | | |
go build -o ${{ matrix.os == 'windows' && 'capollama.exe' || 'capollama' }} | |
- name: Create release artifact | |
run: | | |
zip capollama-${{ matrix.suffix }}.zip ${{ matrix.os == 'windows' && 'capollama.exe' || 'capollama' }} README.md LICENSE.txt | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: capollama-${{ matrix.suffix }} | |
path: capollama-${{ matrix.suffix }}.zip | |
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@v2 | |
with: | |
files: | | |
*/capollama-*.zip |