Skip to content

fix: run workflow also on dev branch #11

fix: run workflow also on dev branch

fix: run workflow also on dev branch #11

Workflow file for this run

# 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", "dev" ]
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: Semantic Release
id: semantic
uses: cycjimmy/semantic-release-action@v4
with:
semantic_version: 21.1.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload assets
if: steps.semantic.outputs.new_release_published == 'true' # Only run if a release was created
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.semantic.outputs.new_release_git_tag }} # Use the tag from semantic-release
files: |
kllama-linux-amd64
kllama-macos-amd64
kllama-windows-amd64.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}