- Replaced actions/checkout with native git fetch (fixes directory not found) - Release workflow now triggers on every push to main (no tags needed) - Auto-creates/updates "latest" release with 6 cross-compiled binaries - Includes checksums, install instructions, and recent commit log - Requires GITEA_TOKEN secret in repo settings 💘 Generated with Crush Assisted-by: GLM-5.1 via Crush <crush@charm.land>
41 lines
971 B
YAML
41 lines
971 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
run: |
|
|
git init
|
|
git remote add origin ${{ github.server_url }}/${{ github.repository }}.git
|
|
git fetch origin ${{ github.ref }}
|
|
git checkout FETCH_HEAD
|
|
git log --oneline -3
|
|
|
|
- name: Setup Go
|
|
run: |
|
|
if ! command -v go &> /dev/null; then
|
|
wget -q https://go.dev/dl/go1.24.3.linux-amd64.tar.gz
|
|
sudo tar -C /usr/local -xzf go1.24.3.linux-amd64.tar.gz
|
|
export PATH=/usr/local/go/bin:$PATH
|
|
echo "PATH=/usr/local/go/bin:$PATH" >> $GITHUB_ENV
|
|
fi
|
|
go version
|
|
|
|
- name: Verify source
|
|
run: ls -la cmd/muyue/ internal/
|
|
|
|
- name: Build
|
|
run: |
|
|
go build -o muyue ./cmd/muyue/
|
|
./muyue version
|
|
|
|
- name: Vet
|
|
run: go vet ./...
|