mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-05-19 18:58:03 +02:00
50 lines
1.0 KiB
YAML
50 lines
1.0 KiB
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: Check out code into the Go module directory
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go ${{ matrix.goVer }}
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ matrix.goVer }}
|
|
cache: false
|
|
id: go
|
|
|
|
- name: cache go modules
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/go/pkg/mod
|
|
~/.cache/go-build
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-go-
|
|
|
|
- name: Format Check
|
|
if: matrix.os != 'windows-latest'
|
|
run: |
|
|
diff -u <(echo -n) <(gofmt -d .)
|
|
|
|
- name: Get dependencies
|
|
run: go mod download
|
|
|
|
- name: Build
|
|
run: go build -v ./...
|