-
Notifications
You must be signed in to change notification settings - Fork 5
31 lines (26 loc) · 1.13 KB
/
Copy pathrelease.yml
File metadata and controls
31 lines (26 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.24"
- name: Build binaries
run: |
GOOS=linux GOARCH=amd64 go build -ldflags="-X main.version=${{ github.ref_name }}" -o dist/devcheck-linux-amd64 ./cmd/devcheck
GOOS=linux GOARCH=arm64 go build -ldflags="-X main.version=${{ github.ref_name }}" -o dist/devcheck-linux-arm64 ./cmd/devcheck
GOOS=darwin GOARCH=amd64 go build -ldflags="-X main.version=${{ github.ref_name }}" -o dist/devcheck-darwin-amd64 ./cmd/devcheck
GOOS=darwin GOARCH=arm64 go build -ldflags="-X main.version=${{ github.ref_name }}" -o dist/devcheck-darwin-arm64 ./cmd/devcheck
GOOS=windows GOARCH=amd64 go build -ldflags="-X main.version=${{ github.ref_name }}" -o dist/devcheck-windows-amd64.exe ./cmd/devcheck
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}