👷 ci: release versioning

This commit is contained in:
2026-07-27 13:52:18 +07:00
parent 6597121f8c
commit 2f8eac5ca0
+3 -1
View File
@@ -44,11 +44,12 @@ jobs:
GOOS: ${{ matrix.goos }} GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }} GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: "0" CGO_ENABLED: "0"
VERSION: ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || github.sha }}
run: | run: |
ext="" ext=""
if [ "$GOOS" = "windows" ]; then ext=".exe"; fi if [ "$GOOS" = "windows" ]; then ext=".exe"; fi
mkdir -p dist mkdir -p dist
go build -o "dist/git-identity-audit-${GOOS}-${GOARCH}${ext}" . go build -o "dist/git-identity-audit-${VERSION}-${GOOS}-${GOARCH}${ext}" .
- uses: actions/upload-artifact@v5 - uses: actions/upload-artifact@v5
with: with:
name: git-identity-audit-${{ matrix.goos }}-${{ matrix.goarch }} name: git-identity-audit-${{ matrix.goos }}-${{ matrix.goarch }}
@@ -67,4 +68,5 @@ jobs:
merge-multiple: true merge-multiple: true
- uses: softprops/action-gh-release@v2 - uses: softprops/action-gh-release@v2
with: with:
name: ${{ github.ref_name }}
files: dist/* files: dist/*