forked from IceflowRE/go-wargaming
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1.02 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
on:
push:
branches:
- main
pull_request:
branches:
- main
name: Building
env:
GO111MODULE: on
permissions:
contents: read
jobs:
build:
name: "${{ matrix.platform }} - ${{ matrix.go-version }}"
permissions:
actions: write # for styfle/cancel-workflow-action to cancel/stop running workflows
contents: read # for actions/checkout to fetch code
strategy:
matrix:
go-version: [1.19.x, 1.20.x]
platform: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Cancel previous workflow
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v3
- name: Build
run: go build ./...