Skip to content

Commit

Permalink
Added arm64 builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
brett19 committed Mar 21, 2024
1 parent 48918fb commit f5e65ac
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
strategy:
matrix:
platform: [darwin, linux, windows]
arch: [amd64, arm64]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
Expand All @@ -21,31 +22,42 @@ jobs:
- name: Install dependencies
run: go get .
- name: Build Binary
run: GOOS=${{ matrix.platform }} GOARCH=amd64 go build -o cbdinocluster-${{ matrix.platform }} -ldflags="-X github.com/couchbase/gocbcorex/contrib/buildversion.MainPkgVersion=${{ github.ref_name }}"
run: GOOS=${{ matrix.platform }} GOARCH=${{ matrix.arch }} go build -o cbdinocluster-${{ matrix.platform }}-${{ matrix.arch }} -ldflags="-X github.com/couchbase/gocbcorex/contrib/buildversion.MainPkgVersion=${{ github.ref_name }}"
- uses: actions/upload-artifact@v3
with:
name: cbdinocluster-${{ matrix.platform }}
path: cbdinocluster-${{ matrix.platform }}
name: cbdinocluster-${{ matrix.platform }}-${{ matrix.arch }}
path: cbdinocluster-${{ matrix.platform }}-${{ matrix.arch }}
publish:
name: Publish
needs: [build]
runs-on: ubuntu-20.04
steps:
- uses: actions/download-artifact@v3
with:
name: cbdinocluster-linux
name: cbdinocluster-linux-amd64
- uses: actions/download-artifact@v3
with:
name: cbdinocluster-darwin
name: cbdinocluster-linux-arm64
- uses: actions/download-artifact@v3
with:
name: cbdinocluster-windows
- name: Rename Windows Binary
run: mv cbdinocluster-windows cbdinocluster-windows.exe
name: cbdinocluster-darwin-amd64
- uses: actions/download-artifact@v3
with:
name: cbdinocluster-darwin-arm64
- uses: actions/download-artifact@v3
with:
name: cbdinocluster-windows-amd64
- name: Rename Windows Amd64 Binary
run: mv cbdinocluster-windows-amd64 cbdinocluster-windows-amd64.exe
- name: Rename Windows Arm64 Binary
run: mv cbdinocluster-windows-arm64 cbdinocluster-windows-arm64.exe
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
cbdinocluster-darwin
cbdinocluster-linux
cbdinocluster-windows.exe
cbdinocluster-darwin-amd64
cbdinocluster-darwin-arm64
cbdinocluster-linux-amd64
cbdinocluster-linux-arm64
cbdinocluster-windows-amd64.exe
cbdinocluster-windows-arm64.exe

0 comments on commit f5e65ac

Please sign in to comment.