Skip to content

v1.23.1-v20231101

v1.23.1-v20231101 #1

Workflow file for this run

name: Release Binaries
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.21.x' ]
go-os: [ 'darwin', 'linux', 'windows' ]
go-arch: [ 'amd64', 'arm64' ]
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Download Dependencies
run: go mod download
- name: Binary Name Unix
if: ${{ matrix.go-os != 'windows' }}
run: echo "BINARY_NAME=go-fitz-formpost-${{ github.ref_name }}-${{ matrix.go-os }}-${{ matrix.go-arch }}" >> $GITHUB_ENV
- name: Binary Name Windows
if: ${{ matrix.go-os == 'windows' }}
run: echo "BINARY_NAME=go-fitz-formpost-${{ github.ref_name }}-${{ matrix.go-os }}-${{ matrix.go-arch }}.exe" >> $GITHUB_ENV
- name: Go Build
run: GOOS=${{ matrix.go-os }} GOARCH=${{ matrix.go-arch }} go build -ldflags="-s -w" -o ${{ env.BINARY_NAME }}
- name: Upload Asset
# Note: "Settings > Actions > Workflow permissions > Read and write permissions" must be set
uses: softprops/action-gh-release@v1
with:
files: ${{ env.BINARY_NAME }}