add releaserc.yaml file #8
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
# This workflow will build a golang project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
name: Go | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: write | |
jobs: | |
release: | |
name: Create Release and Upload Binary | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.21' | |
- name: Build CLI binary | |
run: | | |
GOOS=linux GOARCH=amd64 go build -o kllama-linux-amd64 . | |
GOOS=darwin GOARCH=amd64 go build -o kllama-macos-amd64 . | |
GOOS=windows GOARCH=amd64 go build -o kllama-windows-amd64.exe . | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Semantic Release | |
uses: cycjimmy/semantic-release-action@v4 | |
with: | |
semantic_version: 21.1.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload assets | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
kllama-linux-amd64 | |
kllama-macos-amd64 | |
kllama-windows-amd64.exe | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |