From bed0cf5b508f9fd15ce7e6201d9ddc69a98e4b92 Mon Sep 17 00:00:00 2001 From: Snider Date: Wed, 28 Jan 2026 15:46:16 +0000 Subject: [PATCH] ci: add dev release workflow with multi-platform builds - Add dev-release.yml workflow that builds CLI for linux/darwin/windows (amd64/arm64) on every push to dev branch - Update .goreleaser.yaml repo owner from Snider to host-uk - Dev release is automatically updated with latest binaries Co-Authored-By: Claude Opus 4.5 --- .github/workflows/dev-release.yml | 93 +++++++++++++++++++++++++++++++ .goreleaser.yaml | 6 +- 2 files changed, 96 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/dev-release.yml diff --git a/.github/workflows/dev-release.yml b/.github/workflows/dev-release.yml new file mode 100644 index 00000000..da50623a --- /dev/null +++ b/.github/workflows/dev-release.yml @@ -0,0 +1,93 @@ +name: Dev Release + +on: + push: + branches: [dev] + workflow_dispatch: + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + include: + - goos: linux + goarch: amd64 + - goos: linux + goarch: arm64 + - goos: darwin + goarch: amd64 + - goos: darwin + goarch: arm64 + - goos: windows + goarch: amd64 + - goos: windows + goarch: arm64 + + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.24' + check-latest: true + + - name: Build CLI + env: + GOOS: ${{ matrix.goos }} + GOARCH: ${{ matrix.goarch }} + CGO_ENABLED: '0' + run: | + EXT="" + if [ "$GOOS" = "windows" ]; then EXT=".exe"; fi + go build -trimpath -ldflags="-s -w" -o core-${GOOS}-${GOARCH}${EXT} ./cmd/core + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: core-${{ matrix.goos }}-${{ matrix.goarch }} + path: core-* + + release: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + merge-multiple: true + + - name: List artifacts + run: ls -la artifacts/ + + - name: Delete existing dev release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh release delete dev -y || true + + - name: Delete existing dev tag + run: git push origin :refs/tags/dev || true + + - name: Create dev release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COMMIT_SHA: ${{ github.sha }} + run: | + gh release create dev \ + --title "Development Build" \ + --notes "Latest development build from the dev branch. + + **Commit:** ${COMMIT_SHA} + **Built:** $(date -u +'%Y-%m-%d %H:%M:%S UTC') + + This is a pre-release for testing. Use tagged releases for production." \ + --prerelease \ + --target dev \ + artifacts/* diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 2d540605..74346f6f 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,4 +1,4 @@ -# Minimal Goreleaser configuration for Snider/Core +# Minimal Goreleaser configuration for host-uk/core # No functional changes to the codebase, just release automation. version: 2 @@ -79,7 +79,7 @@ changelog: release: github: - owner: Snider - name: Core + owner: host-uk + name: core draft: false prerelease: auto