Skip to content

Commit 83a9d66

Browse files
committed
Build and publish linux arm64 variant
1 parent 1ae89b1 commit 83a9d66

File tree

2 files changed

+16
-21
lines changed

2 files changed

+16
-21
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,19 @@ jobs:
1818
go-version-file: 'go.mod'
1919

2020
- name: Storage-CLI Build for Linux
21-
env:
22-
GOOS: linux
23-
GOARCH: amd64
24-
CGO_ENABLED: 0
2521
run: |
2622
echo "Building Storage CLI for Linux"
27-
go build -ldflags "-X main.version=0.0.0" \
23+
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X main.version=0.0.0" \
2824
-o "storage-cli-linux-amd64"
2925
sha1sum "storage-cli-linux-amd64"
26+
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -ldflags "-X main.version=0.0.0" \
27+
-o "storage-cli-linux-arm64"
28+
sha1sum "storage-cli-linux-arm64"
3029
3130
- name: Storage-CLI Build for Windows
32-
env:
33-
GOOS: windows
34-
GOARCH: amd64
35-
CGO_ENABLED: 0
3631
run: |
3732
echo "Building Storage CLI for Windows"
38-
go build -ldflags "-X main.version=0.0.0" \
33+
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X main.version=0.0.0" \
3934
-o "storage-cli-windows-amd64.exe"
4035
sha1sum "storage-cli-windows-amd64.exe"
4136
@@ -52,5 +47,6 @@ jobs:
5247
name: storage-cli-${{ steps.sanitize.outputs.branch }}-${{ github.sha }}
5348
path: |
5449
storage-cli-linux-amd64
50+
storage-cli-linux-arm64
5551
storage-cli-windows-amd64.exe
5652
retention-days: 30

.github/workflows/release-manual.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,27 +76,25 @@ jobs:
7676
git push origin "${{ steps.version.outputs.VERSION }}"
7777
7878
- name: Build for Linux
79-
env:
80-
GOOS: linux
81-
GOARCH: amd64
82-
CGO_ENABLED: 0
8379
run: |
8480
echo "Building Storage CLI for Linux"
85-
go build -ldflags "-X main.version=${{ steps.version.outputs.VERSION_NUMBER }}" \
81+
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X main.version=${{ steps.version.outputs.VERSION_NUMBER }}" \
8682
-o "storage-cli-${{ steps.version.outputs.VERSION_NUMBER }}-linux-amd64"
87-
echo "### Linux Build Checksums" >> $GITHUB_STEP_SUMMARY
83+
echo "### Linux amd64 Build Checksums" >> $GITHUB_STEP_SUMMARY
8884
echo '```' >> $GITHUB_STEP_SUMMARY
8985
sha1sum "storage-cli-${{ steps.version.outputs.VERSION_NUMBER }}-linux-amd64" >> $GITHUB_STEP_SUMMARY
9086
echo '```' >> $GITHUB_STEP_SUMMARY
87+
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -ldflags "-X main.version=${{ steps.version.outputs.VERSION_NUMBER }}" \
88+
-o "storage-cli-${{ steps.version.outputs.VERSION_NUMBER }}-linux-arm64"
89+
echo "### Linux arm64 Build Checksums" >> $GITHUB_STEP_SUMMARY
90+
echo '```' >> $GITHUB_STEP_SUMMARY
91+
sha1sum "storage-cli-${{ steps.version.outputs.VERSION_NUMBER }}-linux-arm64" >> $GITHUB_STEP_SUMMARY
92+
echo '```' >> $GITHUB_STEP_SUMMARY
9193
9294
- name: Build for Windows
93-
env:
94-
GOOS: windows
95-
GOARCH: amd64
96-
CGO_ENABLED: 0
9795
run: |
9896
echo "Building Storage CLI for Windows"
99-
go build -ldflags "-X main.version=${{ steps.version.outputs.VERSION_NUMBER }}" \
97+
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X main.version=${{ steps.version.outputs.VERSION_NUMBER }}" \
10098
-o "storage-cli-${{ steps.version.outputs.VERSION_NUMBER }}-windows-amd64.exe"
10199
echo "### Windows Build Checksums" >> $GITHUB_STEP_SUMMARY
102100
echo '```' >> $GITHUB_STEP_SUMMARY
@@ -111,6 +109,7 @@ jobs:
111109
body: Release ${{ steps.version.outputs.VERSION }}
112110
artifacts: |
113111
storage-cli-${{ steps.version.outputs.VERSION_NUMBER }}-linux-amd64
112+
storage-cli-${{ steps.version.outputs.VERSION_NUMBER }}-linux-arm64
114113
storage-cli-${{ steps.version.outputs.VERSION_NUMBER }}-windows-amd64.exe
115114
token: ${{ secrets.GITHUB_TOKEN }}
116115
allowUpdates: true

0 commit comments

Comments
 (0)