Skip to content

chore: update actions/checkout action to v4.1.3 (#97) #210

chore: update actions/checkout action to v4.1.3 (#97)

chore: update actions/checkout action to v4.1.3 (#97) #210

Workflow file for this run

name: build
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: [amd64, arm64]
steps:
- uses: actions/[email protected]
- name: setup golang
uses: actions/[email protected]
with:
go-version-file: "go.mod"
- name: add build file suffix
if: ${{ matrix.goos == 'windows' }}
run: echo "SUFFIX=.exe" >> $GITHUB_ENV
- name: build project
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: go build -o build/monstercat_${{ matrix.goos }}_${{ matrix.goarch }}${{ env.SUFFIX }} main.go
- name: store binary
uses: actions/[email protected]
with:
name: ${{ matrix.goos }}_${{ matrix.goarch }}
path: build/
release:
runs-on: ubuntu-latest
needs: [build]
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: download all binaries
uses: actions/[email protected]
with:
path: build/
- name: upload artifacts to release
uses: softprops/[email protected]
with:
files: build/**/*