Update GitHub Actions versions (#4) #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go Build & Format | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- '*' | |
tags: | |
jobs: | |
build: | |
name: Build program | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.16' | |
- name: Get dependencies | |
run: go mod download | |
- name: Build | |
run: go build | |
- name: Verify gofmt | |
run: X=$(gofmt -s -d .) ; [[ "$X" == "" ]] || (echo "$X" ; exit 1) | |
shell: bash |