This repository has been archived by the owner on Jan 29, 2025. It is now read-only.
chore: update dependency go to v1.23.3 #289
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/checkout@v4.2.2 | |
- name: setup golang | |
uses: actions/setup-go@v5.1.0 | |
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/upload-artifact@v4.4.3 | |
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/download-artifact@v4.1.8 | |
with: | |
path: build/ | |
- name: upload artifacts to release | |
uses: softprops/action-gh-release@v2.0.9 | |
with: | |
files: build/**/* |