-
Notifications
You must be signed in to change notification settings - Fork 19
52 lines (40 loc) · 1.24 KB
/
check.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
40
41
42
43
44
45
46
47
48
49
50
51
52
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Check
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
check-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check spelling of files
uses: crate-ci/typos@master
continue-on-error: false
with:
files: ./
- name: Set up Go1.17
uses: actions/setup-go@v4
with:
go-version: '1.17'
- name: Check Binary Install
continue-on-error: false
run: |
curl -fsSL https://github.com/xhd2015/xgo/raw/master/script/install/install.sh | env INSTALL_TO_BIN=true bash -x
xgo revision
- name: Build
run: go build -o /dev/null -v ./cmd/xgo
- name: Set up Go1.18
uses: actions/setup-go@v4
with:
go-version: '1.18'
# use go1.18 because -trimpath requires it
- name: Build Release
run: go run ./script/build-release --include-install-src --include-local
- name: Check Revesion
run: ~/.xgo/bin/xgo revision
- name: Check Go Version
run: ~/.xgo/bin/xgo exec go version