diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index be4d878..ee536c7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '1.25' + go-version: '1.23' - name: Get version from tag id: get_version @@ -31,20 +31,37 @@ jobs: run: | mkdir -p dist + # Build Server # Linux AMD64 - GOOS=linux GOARCH=amd64 go build -o dist/relspec-linux-amd64 -ldflags "-X main.version=${{ steps.get_version.outputs.VERSION }}" ./cmd/relspec + GOOS=linux GOARCH=amd64 go build -o dist/whatshook-server-linux-amd64 -ldflags "-X main.version=${{ steps.get_version.outputs.VERSION }}" ./cmd/server # Linux ARM64 - GOOS=linux GOARCH=arm64 go build -o dist/relspec-linux-arm64 -ldflags "-X main.version=${{ steps.get_version.outputs.VERSION }}" ./cmd/relspec + GOOS=linux GOARCH=arm64 go build -o dist/whatshook-server-linux-arm64 -ldflags "-X main.version=${{ steps.get_version.outputs.VERSION }}" ./cmd/server # macOS AMD64 - GOOS=darwin GOARCH=amd64 go build -o dist/relspec-darwin-amd64 -ldflags "-X main.version=${{ steps.get_version.outputs.VERSION }}" ./cmd/relspec + GOOS=darwin GOARCH=amd64 go build -o dist/whatshook-server-darwin-amd64 -ldflags "-X main.version=${{ steps.get_version.outputs.VERSION }}" ./cmd/server # macOS ARM64 (Apple Silicon) - GOOS=darwin GOARCH=arm64 go build -o dist/relspec-darwin-arm64 -ldflags "-X main.version=${{ steps.get_version.outputs.VERSION }}" ./cmd/relspec + GOOS=darwin GOARCH=arm64 go build -o dist/whatshook-server-darwin-arm64 -ldflags "-X main.version=${{ steps.get_version.outputs.VERSION }}" ./cmd/server # Windows AMD64 - GOOS=windows GOARCH=amd64 go build -o dist/relspec-windows-amd64.exe -ldflags "-X main.version=${{ steps.get_version.outputs.VERSION }}" ./cmd/relspec + GOOS=windows GOARCH=amd64 go build -o dist/whatshook-server-windows-amd64.exe -ldflags "-X main.version=${{ steps.get_version.outputs.VERSION }}" ./cmd/server + + # Build CLI + # Linux AMD64 + GOOS=linux GOARCH=amd64 go build -o dist/whatshook-cli-linux-amd64 -ldflags "-X main.version=${{ steps.get_version.outputs.VERSION }}" ./cmd/cli + + # Linux ARM64 + GOOS=linux GOARCH=arm64 go build -o dist/whatshook-cli-linux-arm64 -ldflags "-X main.version=${{ steps.get_version.outputs.VERSION }}" ./cmd/cli + + # macOS AMD64 + GOOS=darwin GOARCH=amd64 go build -o dist/whatshook-cli-darwin-amd64 -ldflags "-X main.version=${{ steps.get_version.outputs.VERSION }}" ./cmd/cli + + # macOS ARM64 (Apple Silicon) + GOOS=darwin GOARCH=arm64 go build -o dist/whatshook-cli-darwin-arm64 -ldflags "-X main.version=${{ steps.get_version.outputs.VERSION }}" ./cmd/cli + + # Windows AMD64 + GOOS=windows GOARCH=amd64 go build -o dist/whatshook-cli-windows-amd64.exe -ldflags "-X main.version=${{ steps.get_version.outputs.VERSION }}" ./cmd/cli # Create checksums cd dist @@ -75,20 +92,32 @@ jobs: ## Installation - Download the appropriate binary for your platform: + WhatsHooked provides two binaries: + - **Server**: The WhatsApp webhook server + - **CLI**: Command-line interface for managing the server - - **Linux (AMD64)**: \`relspec-linux-amd64\` - - **Linux (ARM64)**: \`relspec-linux-arm64\` - - **macOS (Intel)**: \`relspec-darwin-amd64\` - - **macOS (Apple Silicon)**: \`relspec-darwin-arm64\` - - **Windows (AMD64)**: \`relspec-windows-amd64.exe\` + Download the appropriate binaries for your platform: - Make the binary executable (Linux/macOS): + ### Server + - **Linux (AMD64)**: \`whatshook-server-linux-amd64\` + - **Linux (ARM64)**: \`whatshook-server-linux-arm64\` + - **macOS (Intel)**: \`whatshook-server-darwin-amd64\` + - **macOS (Apple Silicon)**: \`whatshook-server-darwin-arm64\` + - **Windows (AMD64)**: \`whatshook-server-windows-amd64.exe\` + + ### CLI + - **Linux (AMD64)**: \`whatshook-cli-linux-amd64\` + - **Linux (ARM64)**: \`whatshook-cli-linux-arm64\` + - **macOS (Intel)**: \`whatshook-cli-darwin-amd64\` + - **macOS (Apple Silicon)**: \`whatshook-cli-darwin-arm64\` + - **Windows (AMD64)**: \`whatshook-cli-windows-amd64.exe\` + + Make the binaries executable (Linux/macOS): \`\`\`bash - chmod +x relspec-* + chmod +x whatshook-* \`\`\` - Verify the download with the provided checksums. + Verify downloads with the provided checksums. EOF - name: Create Release @@ -96,11 +125,16 @@ jobs: with: body_path: release_notes.md files: | - dist/relspec-linux-amd64 - dist/relspec-linux-arm64 - dist/relspec-darwin-amd64 - dist/relspec-darwin-arm64 - dist/relspec-windows-amd64.exe + dist/whatshook-server-linux-amd64 + dist/whatshook-server-linux-arm64 + dist/whatshook-server-darwin-amd64 + dist/whatshook-server-darwin-arm64 + dist/whatshook-server-windows-amd64.exe + dist/whatshook-cli-linux-amd64 + dist/whatshook-cli-linux-arm64 + dist/whatshook-cli-darwin-amd64 + dist/whatshook-cli-darwin-arm64 + dist/whatshook-cli-windows-amd64.exe dist/checksums.txt draft: false prerelease: false