diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7103793..c2f3bcf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,6 +27,16 @@ jobs: -o "storage-cli-linux-arm64" sha1sum "storage-cli-linux-arm64" + - name: Storage-CLI Build for macOS + run: | + echo "Building Storage CLI for macOS" + GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X main.version=0.0.0" \ + -o "storage-cli-darwin-amd64" + sha1sum "storage-cli-darwin-amd64" + GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 go build -ldflags "-X main.version=0.0.0" \ + -o "storage-cli-darwin-arm64" + sha1sum "storage-cli-darwin-arm64" + - name: Storage-CLI Build for Windows run: | echo "Building Storage CLI for Windows" @@ -48,5 +58,7 @@ jobs: path: | storage-cli-linux-amd64 storage-cli-linux-arm64 + storage-cli-darwin-amd64 + storage-cli-darwin-arm64 storage-cli-windows-amd64.exe retention-days: 30 diff --git a/.github/workflows/release-manual.yml b/.github/workflows/release-manual.yml index 331d9a7..f8d87b6 100644 --- a/.github/workflows/release-manual.yml +++ b/.github/workflows/release-manual.yml @@ -91,6 +91,22 @@ jobs: sha1sum "storage-cli-${{ steps.version.outputs.VERSION_NUMBER }}-linux-arm64" >> $GITHUB_STEP_SUMMARY echo '```' >> $GITHUB_STEP_SUMMARY + - name: Build for macOS + run: | + echo "Building Storage CLI for macOS" + GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X main.version=${{ steps.version.outputs.VERSION_NUMBER }}" \ + -o "storage-cli-${{ steps.version.outputs.VERSION_NUMBER }}-darwin-amd64" + echo "### macOS amd64 Build Checksums" >> $GITHUB_STEP_SUMMARY + echo '```' >> $GITHUB_STEP_SUMMARY + sha1sum "storage-cli-${{ steps.version.outputs.VERSION_NUMBER }}-darwin-amd64" >> $GITHUB_STEP_SUMMARY + echo '```' >> $GITHUB_STEP_SUMMARY + GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 go build -ldflags "-X main.version=${{ steps.version.outputs.VERSION_NUMBER }}" \ + -o "storage-cli-${{ steps.version.outputs.VERSION_NUMBER }}-darwin-arm64" + echo "### macOS arm64 Build Checksums" >> $GITHUB_STEP_SUMMARY + echo '```' >> $GITHUB_STEP_SUMMARY + sha1sum "storage-cli-${{ steps.version.outputs.VERSION_NUMBER }}-darwin-arm64" >> $GITHUB_STEP_SUMMARY + echo '```' >> $GITHUB_STEP_SUMMARY + - name: Build for Windows run: | echo "Building Storage CLI for Windows" @@ -110,6 +126,8 @@ jobs: artifacts: | storage-cli-${{ steps.version.outputs.VERSION_NUMBER }}-linux-amd64 storage-cli-${{ steps.version.outputs.VERSION_NUMBER }}-linux-arm64 + storage-cli-${{ steps.version.outputs.VERSION_NUMBER }}-darwin-amd64 + storage-cli-${{ steps.version.outputs.VERSION_NUMBER }}-darwin-arm64 storage-cli-${{ steps.version.outputs.VERSION_NUMBER }}-windows-amd64.exe token: ${{ secrets.GITHUB_TOKEN }} allowUpdates: true