This repository was archived by the owner on Jan 29, 2025. It is now read-only.
chore: update morphy2k/revive-action action to v2.7.2 #317
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/[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/**/* |