Skip to content

Release

Release #3

Workflow file for this run

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