Skip to content

fix: update Go version to 1.24 in workflows and go.mod #9

fix: update Go version to 1.24 in workflows and go.mod

fix: update Go version to 1.24 in workflows and go.mod #9

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
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Install X11 dependencies
run: sudo apt-get update && sudo apt-get install -y libx11-dev
- name: Get version
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Build binaries
run: |
mkdir -p build
VERSION=${{ steps.version.outputs.VERSION }}
LDFLAGS="-X main.version=${VERSION}"
GOOS=linux GOARCH=amd64 go build -ldflags "$LDFLAGS" -o build/ag-linux-amd64 ./cmd/ag
GOOS=linux GOARCH=arm64 go build -ldflags "$LDFLAGS" -o build/ag-linux-arm64 ./cmd/ag
GOOS=darwin GOARCH=amd64 go build -ldflags "$LDFLAGS" -o build/ag-darwin-amd64 ./cmd/ag
GOOS=darwin GOARCH=arm64 go build -ldflags "$LDFLAGS" -o build/ag-darwin-arm64 ./cmd/ag
GOOS=windows GOARCH=amd64 go build -ldflags "$LDFLAGS" -o build/ag-windows-amd64.exe ./cmd/ag
- name: Create checksums
run: |
cd build
sha256sum * > checksums.txt
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
build/ag-linux-amd64
build/ag-linux-arm64
build/ag-darwin-amd64
build/ag-darwin-arm64
build/ag-windows-amd64.exe
build/checksums.txt
generate_release_notes: true