Skip to content

bump go versions

bump go versions #70

Workflow file for this run

name: Build and Release
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
release:
types: [ created ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.20', '1.21']
os: ['linux', 'darwin']
arch: ['amd64', 'arm', 'arm64']
include:
- go: '1.21'
release: true
exclude:
- os: 'darwin'
arch: 'arm'
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Build
run: go build -v .
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
- name: Upload to Release
if: github.event.release.id && matrix.release
run: |
curl -f -sSL -X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN}}" \
-H "Content-Type: application/octet-stream" \
--upload-file nCAT \
"https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${{github.event.release.id}}/assets?name=nCAT-${{matrix.os}}-${{matrix.arch}}"