name: Release on: push: tags: - 'v*' permissions: contents: write jobs: build: name: Build binaries runs-on: ubuntu-latest strategy: matrix: include: # Linux - goos: linux goarch: amd64 platform: linux-amd64 - goos: linux goarch: arm64 platform: linux-arm64 # macOS (Apple Silicon only) - goos: darwin goarch: arm64 platform: darwin-arm64 # Windows - goos: windows goarch: amd64 platform: windows-amd64 - goos: windows goarch: arm64 platform: windows-arm64 steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup Go uses: actions/setup-go@v5 with: go-version: '1.22' cache: true - name: Get version id: version run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT - name: Build binary env: GOOS: ${{ matrix.goos }} GOARCH: ${{ matrix.goarch }} CGO_ENABLED: 0 run: | VERSION=${{ steps.version.outputs.VERSION }} BINARY_NAME="obm" if [ "$GOOS" = "windows" ]; then BINARY_NAME="obm.exe" fi LDFLAGS="-s -w -X main.version=$VERSION" GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "$LDFLAGS" -o "$BINARY_NAME" ./cmd/obm - name: Create archive run: | BINARY_NAME="obm" if [ "${{ matrix.goos }}" = "windows" ]; then BINARY_NAME="obm.exe" zip -j "obm-${{ matrix.platform }}.zip" "$BINARY_NAME" else tar -czf "obm-${{ matrix.platform }}.tar.gz" "$BINARY_NAME" fi - name: Upload artifact uses: actions/upload-artifact@v4 with: name: obm-${{ matrix.platform }} path: | obm-${{ matrix.platform }}.tar.gz obm-${{ matrix.platform }}.zip retention-days: 1 if-no-files-found: warn release: name: Create Release runs-on: ubuntu-latest needs: build steps: - name: Checkout code uses: actions/checkout@v4 with: fetch-depth: 0 - name: Get version id: version run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT - name: Download all artifacts uses: actions/download-artifact@v4 with: path: artifacts - name: List artifacts run: find artifacts -type f - name: Create checksums run: | cd artifacts find . -type f \( -name "*.tar.gz" -o -name "*.zip" \) -exec sha256sum {} \; > ../checksums.txt cat ../checksums.txt - name: Create Release uses: softprops/action-gh-release@v1 with: name: Release ${{ steps.version.outputs.VERSION }} body: | ## obm ${{ steps.version.outputs.VERSION }} OpenBoatMobile CLI tool for deploying AI agent infrastructure. ### Platforms - `linux-amd64` - Linux (x86_64) - `linux-arm64` - Linux (ARM64/AArch64) - `darwin-arm64` - macOS (Apple Silicon) - `windows-amd64` - Windows (x86_64) - `windows-arm64` - Windows (ARM64) ### Installation **Linux/macOS:** ```bash # Download and extract curl -sL https://github.com/openboatmobile/obm/releases/download/${{ steps.version.outputs.VERSION }}/obm-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | sed 's/x86_64/amd64/').tar.gz | tar xz chmod +x obm sudo mv obm /usr/local/bin/ ``` **Windows:** Download the appropriate `.zip` file, extract, and add to PATH. ### Usage ```bash obm --help obm deploy # Interactive deployment wizard obm validate # Validate configuration obm status # Check infrastructure health ``` files: | artifacts/**/obm-*.tar.gz artifacts/**/obm-*.zip checksums.txt draft: false prerelease: ${{ contains(steps.version.outputs.VERSION, '-') }} generate_release_notes: false