Skip to content

Commit

Permalink
add cli artifact build to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MRtecno98 committed Jul 20, 2024
1 parent 9928f9c commit fa0be7d
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,20 @@ on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
include:
- os: windows-latest
artifact: bucket.exe
- os: ubuntu-latest
artifact: bucket
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Go 1.21.x
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
# Semantic version range syntax or exact version of Go
go-version: '1.21.x'
Expand All @@ -18,7 +26,13 @@ jobs:
run: go get .

- name: Build
run: go build -v ./...
run: go build -v -o ${{ matrix.artifact }}

- name: Test
run: go test -v ./...
run: go test -v

- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.artifact }}

0 comments on commit fa0be7d

Please sign in to comment.