feat: Initial commit

This commit is contained in:
2026-07-13 05:45:48 +07:00
commit 1f616240db
12 changed files with 810 additions and 0 deletions
+70
View File
@@ -0,0 +1,70 @@
name: CI
on:
push:
branches: [main]
tags: ["v*.*.*"]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: "1.26.4"
- run: go build ./...
- run: go vet ./...
- run: go test ./...
build:
needs: test
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goos: linux
goarch: amd64
- goos: linux
goarch: arm64
- goos: darwin
goarch: amd64
- goos: darwin
goarch: arm64
- goos: windows
goarch: amd64
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: "1.26.4"
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: "0"
run: |
ext=""
if [ "$GOOS" = "windows" ]; then ext=".exe"; fi
mkdir -p dist
go build -o "dist/git-identity-audit-${GOOS}-${GOARCH}${ext}" .
- uses: actions/upload-artifact@v5
with:
name: git-identity-audit-${{ matrix.goos }}-${{ matrix.goarch }}
path: dist/*
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v6
with:
path: dist
merge-multiple: true
- uses: softprops/action-gh-release@v2
with:
files: dist/*