Skip to content

Commit

Permalink
Build logcli for multiple architectures
Browse files Browse the repository at this point in the history
  • Loading branch information
ntap-fge committed Dec 1, 2023
1 parent 71af6fa commit c211dd5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
matrix:
arch: [amd64, arm64]
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -32,15 +35,20 @@ jobs:
go install github.com/golang/protobuf/[email protected]
go install github.com/gogo/protobuf/[email protected]
- name: Pre-generate code
run: make BUILD_IN_CONTAINER=false generate

- name: Build logcli
run: make BUILD_IN_CONTAINER=false logcli
env:
GOARCH: ${{ matrix.arch }}

- name: Zip logcli
run: zip --junk-paths logcli_amd64.zip cmd/logcli/logcli
run: zip --junk-paths logcli_${{ matrix.arch }}.zip cmd/logcli/logcli

- name: Upload logcli as artifact
uses: actions/upload-artifact@v3
with:
name: logcli_amd64
path: logcli_amd64.zip
name: logcli_${{ matrix.arch }}
path: logcli_${{ matrix.arch }}.zip
retention-days: 3
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ touch-protobuf-sources:
touch $$def; \
done

generate: $(VALITAIL_GENERATED_FILE)

##########
# Logcli #
##########
Expand Down

0 comments on commit c211dd5

Please sign in to comment.