Skip to content

Commit

Permalink
Add GitHub Action for release build
Browse files Browse the repository at this point in the history
  • Loading branch information
treierxyz committed Nov 8, 2024
1 parent 67c1b83 commit 513c2e7
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Go Build and Release

on:
push:
tags:
- 'v*' # Trigger on version tags like v1.0.0

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'

- name: Build for Linux x64
run: GOOS=linux GOARCH=amd64 go build -v ./... -o gojada-linux-amd64

- name: Build for Linux ARMv7
run: GOOS=linux GOARCH=arm GOARM=7 go build -v ./... -o gojada-linux-armv7

- name: Build for Linux ARM64
run: GOOS=linux GOARCH=arm64 go build -v ./... -o gojada-linux-arm64

- name: Build for macOS x64
run: GOOS=darwin GOARCH=amd64 go build -v ./... -o gojada-darwin-amd64

- name: Build for macOS Apple Silicon
run: GOOS=darwin GOARCH=arm64 go build -v ./... -o gojada-darwin-arm64

- name: Build for Windows x64
run: GOOS=windows GOARCH=amd64 go build -v ./... -o gojada-windows-amd64.exe

- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
gojada-linux-amd64
gojada-linux-armv7
gojada-linux-arm64
gojada-darwin-amd64
gojada-darwin-arm64
gojada-windows-amd64.exe

0 comments on commit 513c2e7

Please sign in to comment.