Files
HackBrowserData/.github/workflows/build.yml
T
ᴍᴏᴏɴD4ʀᴋ 700b981e5d feat: Upgrade GitHub Actions to v4 for greater stability (#304)
* ci: Upgrade GitHub Actions to v4 for greater stability

- Close #303
- Upgrade GitHub Actions to v4 in all workflows
- Fix zipping and uploading of Linux arm64 assets in release workflow
- Simplify and remove unnecessary steps in build workflow
2024-01-27 23:15:05 +08:00

39 lines
778 B
YAML

name: build
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
goVer: ["1.21.x"]
steps:
- name: Set up Go ${{ matrix.goVer }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.goVer }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Format Check
if: matrix.os != 'windows-latest'
run: |
diff -u <(echo -n) <(gofmt -d .)
- name: Get dependencies
run: go get -v ./...
- name: Build
run: go build -v ./...