-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (32 loc) · 1020 Bytes
/
release.yml
File metadata and controls
41 lines (32 loc) · 1020 Bytes
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
32
33
34
35
36
37
38
39
40
41
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Build binaries
run: |
mkdir -p dist
# Linux
GOOS=linux GOARCH=amd64 go build -o dist/gh-commitmsg-linux-amd64 ./cmd/commitmsg
GOOS=linux GOARCH=arm64 go build -o dist/gh-commitmsg-linux-arm64 ./cmd/commitmsg
# macOS
GOOS=darwin GOARCH=amd64 go build -o dist/gh-commitmsg-darwin-amd64 ./cmd/commitmsg
GOOS=darwin GOARCH=arm64 go build -o dist/gh-commitmsg-darwin-arm64 ./cmd/commitmsg
# Windows
GOOS=windows GOARCH=amd64 go build -o dist/gh-commitmsg-windows-amd64.exe ./cmd/commitmsg
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: dist/*
generate_release_notes: true