Files
butterfliu/.gitea/workflows/go-ci.yml
lzw-723 eda0ac9e40
All checks were successful
Go CI / test-and-build (push) Successful in 1m32s
工作流产物上传制品库
2026-04-05 23:30:47 +08:00

43 lines
962 B
YAML

name: Go CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test-and-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Download dependencies
run: go mod download
- name: Tidy modules
run: go mod tidy
- name: Run go vet
run: go vet ./...
# - name: Run tests
# run: go test -v -race -coverprofile=coverage.out ./...
- name: Build
run: |
mkdir -p build
GOOS=linux GOARCH=amd64 go build -v -o build/butterfliu-amd64 .
- name: Upload to Gitea Artifacts
uses: https://gitea.com/actions/gitea-upload-artifact@v4
with:
name: butterfliu-amd64-${{ github.sha }}
path: build/butterfliu-amd64
retention-days: 30