Skip to content

Update README.md

Update README.md #15

Workflow file for this run

name: Release Go Binaries
on:
push:
branches: ['main']
tags: ['v*']
permissions:
contents: write
jobs:
setup-release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
build-and-upload:
needs: setup-release
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: [amd64, arm64]
exclude:
- goarch: arm64
goos: windows
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23.1'
- name: Build Binary
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
mkdir -p dist
binary_name="${{ github.event.repository.name }}-${{ matrix.goos }}-${{ matrix.goarch }}"
if [ "${{ matrix.goos }}" = "windows" ]; then
binary_name="${binary_name}.exe"
fi
go build -o "dist/${binary_name}" -v
cd dist
sha256sum "${binary_name}"* > "${binary_name}.sha256"
- name: Upload Release Asset
uses: softprops/action-gh-release@v2
with:
files: dist/*