This repository has been archived by the owner on Oct 14, 2024. It is now read-only.
Bump go minor version #62
Workflow file for this run
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: Test & Build | |
on: push | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.x | |
check-latest: true | |
- name: Get dependencies | |
run: | | |
go mod vendor | |
- name: Go Vet | |
run: go vet ./... | |
- name: Test | |
run: go test ./... | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') | |
needs: | |
- test | |
strategy: | |
matrix: | |
goarch: | |
- amd64 | |
- arm64 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.x | |
check-latest: true | |
- name: Compile | |
run: go build -o docgen-${{ matrix.goarch }} | |
env: | |
GOARCH: ${{ matrix.goarch }} | |
- name: Upload Binaries | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.goarch }} | |
path: docgen-${{ matrix.goarch }} | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: | |
- build | |
steps: | |
- uses: actions/download-artifact@v4 | |
- name: Display structure of downloaded files | |
run: ls -R | |
- uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "**/*" |