Skip to content

Build Binaries

Build Binaries #6

Workflow file for this run

name: Build Binaries
on:
release:
types: [published]
jobs:
build-linux-amd64:
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.23'
- name: Build for Linux amd64
run: |
GOOS=linux GOARCH=amd64 go build -o varunastra .
zip varunastra_linux_amd64.zip varunastra
- name: Upload binaries to release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.release.tag_name }}
files: |
${{github.workspace}}/varunastra_linux_amd64.zip
build-linux-arm64:
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.23'
- name: Build for Linux arm64
run: |
cd cmd/varunastra
GOOS=linux GOARCH=arm64 go build -o varunastra .
zip varunastra_linux_arm64.zip varunastra
- name: Upload binaries to release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.release.tag_name }}
files: |
${{github.workspace}}/varunastra_linux_arm64.zip
build-macos-arm64:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23'
- name: Build for macOS arm64
run: |
cd cmd/varunastra
GOOS=darwin GOARCH=arm64 go build -o varunastra .
zip varunastra_darwin_arm64.zip varunastra
- name: Upload binaries to release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.release.tag_name }}
files: |
${{github.workspace}}/varunastra_darwin_arm64.zip