Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

Update dependency go to v1.22.2 (#16) #56

Update dependency go to v1.22.2 (#16)

Update dependency go to v1.22.2 (#16) #56

Workflow file for this run

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: "**/*"