Skip to content

chore: upgrade dependency #3

chore: upgrade dependency

chore: upgrade dependency #3

name: Release binaries
on:
push:
tags: [ v* ]
permissions:
contents: write
jobs:
release-binaries:
name: Build and release binaries
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
module: ['plain', 'lambda']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
cache-dependency-path: ${{ matrix.module }}/go.sum
go-version-file: ${{ matrix.module }}/go.mod
- name: Build
env:
CGO_ENABLED: 0
run: |
GOOS=linux GOARCH=amd64 go build -C ${{ matrix.module }} -ldflags '-s' -o ../build/print2pdf-${{ matrix.module }}-linux-amd64
GOOS=linux GOARCH=arm64 go build -C ${{ matrix.module }} -ldflags '-s' -o ../build/print2pdf-${{ matrix.module }}-linux-arm64
GOOS=darwin GOARCH=amd64 go build -C ${{ matrix.module }} -ldflags '-s' -o ../build/print2pdf-${{ matrix.module }}-darwin-amd64
GOOS=darwin GOARCH=arm64 go build -C ${{ matrix.module }} -ldflags '-s' -o ../build/print2pdf-${{ matrix.module }}-darwin-arm64
GOOS=windows GOARCH=amd64 go build -C ${{ matrix.module }} -ldflags '-s' -o ../build/print2pdf-${{ matrix.module }}-windows-amd64
GOOS=windows GOARCH=arm64 go build -C ${{ matrix.module }} -ldflags '-s' -o ../build/print2pdf-${{ matrix.module }}-windows-arm64
- name: Release
uses: softprops/action-gh-release@v2
with:
draft: true
generate_release_notes: true
files: |
build/print2pdf-${{ matrix.module }}-linux-amd64
build/print2pdf-${{ matrix.module }}-linux-arm64
build/print2pdf-${{ matrix.module }}-darwin-amd64
build/print2pdf-${{ matrix.module }}-darwin-arm64
build/print2pdf-${{ matrix.module }}-windows-amd64
build/print2pdf-${{ matrix.module }}-windows-arm64