Skip to content

CI

CI #1

Workflow file for this run

name: Build
on:
workflow_dispatch:
inputs:
version:
description: "Version"
required: false
default: "0.6.0"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.23
- name: Install dependencies
run: |
go mod tidy
go get -u golang.org/x/sys # for Windows
- name: Build binaries
run: |
version="${{ github.event.inputs.version }}"
if [ -z "$version" ]; then
version="latest"
fi
mkdir -p bin
architectures=("amd64" "arm64")
for arch in "${architectures[@]}"; do
GOOS=linux GOARCH=$arch go build -o bin/lazyjournal-$version-linux-$arch
GOOS=darwin GOARCH=$arch go build -o bin/lazyjournal-$version-darwin-$arch
GOOS=windows GOARCH=$arch go build -o bin/lazyjournal-$version-windows-$arch.exe
done
- name: Upload binaries to GitHub Actions
uses: actions/upload-artifact@v4
with:
name: binaries
path: bin/