ci: go vet + go test 추가 + Go 1.25 업그레이드 + 태그 릴리즈 빌드
- test job: go vet + build + go test ./... (Windows runner) - release job: 'v*' 태그 push 시 launcher.exe를 GitHub Release에 업로드 - Go 1.24 → 1.25 업그레이드 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
43
.github/workflows/ci.yml
vendored
43
.github/workflows/ci.yml
vendored
@@ -1,21 +1,56 @@
|
|||||||
name: CI
|
name: CI/CD
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
tags: ['v*']
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
# ── 1. 정적 분석 + 빌드 + 테스트 ──────────────────────────────────────────
|
||||||
# Windows runner required for Win32 API dependencies
|
test:
|
||||||
|
# Win32 API 의존성으로 Windows runner 필수
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.24'
|
go-version: '1.25'
|
||||||
|
cache: true
|
||||||
|
|
||||||
|
- name: Vet
|
||||||
|
run: go vet ./...
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: go build -ldflags="-H windowsgui -s -w" -o launcher.exe .
|
run: go build -ldflags="-H windowsgui -s -w" -o launcher.exe .
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: go test ./... -v
|
||||||
|
|
||||||
|
# ── 2. 릴리즈 빌드 & GitHub Release 업로드 (태그 push 시만) ───────────────
|
||||||
|
release:
|
||||||
|
needs: test
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
runs-on: windows-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '1.25'
|
||||||
|
cache: true
|
||||||
|
|
||||||
|
- name: Build release binary
|
||||||
|
run: |
|
||||||
|
$VERSION = "${{ github.ref_name }}"
|
||||||
|
go build -ldflags="-H windowsgui -s -w -X main.version=$VERSION" -o launcher.exe .
|
||||||
|
|
||||||
|
- name: Create GitHub Release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
files: launcher.exe
|
||||||
|
generate_release_notes: true
|
||||||
|
|||||||
Reference in New Issue
Block a user