Skip to content

add cli artifact build to workflow #17

add cli artifact build to workflow

add cli artifact build to workflow #17

Workflow file for this run

name: Go Build
on: [push]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
include:
- os: windows-latest
artifact: bucket.exe
filename: bucket.exe
- os: ubuntu-latest
artifact: bucket
filename: bucket/bucket
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup Go 1.21.x
uses: actions/setup-go@v5
with:
# Semantic version range syntax or exact version of Go
go-version: '1.21.x'
cache: true
- name: Install dependencies
run: go get .
- name: Build
run: go build -v -o ${{ matrix.artifact }}
- name: Test
run: go test -v
- name: Log files
run: |
ls ${{ github.workspace }}
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.filename }}