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 cd6f49d
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,22 @@ on: [push]

jobs:
build:
runs-on: ubuntu-latest
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@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 +28,17 @@ 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: Log files
run: |
ls ${{ github.workspace }}
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.filename }}

0 comments on commit cd6f49d

Please sign in to comment.