From b5430b933e0fb8eeba854c3dc3b45bee3b93cb17 Mon Sep 17 00:00:00 2001 From: Snider Date: Mon, 2 Feb 2026 17:45:05 +0000 Subject: [PATCH] ci(workflows): use host-uk/build@dev for releases - Replace manual Go bootstrap with host-uk/build@dev action - Add matrix builds for linux/amd64, linux/arm64, darwin/universal, windows/amd64 - Update README URLs from Snider/Core to host-uk/core - Simplify artifact handling with merge-multiple Co-Authored-By: Claude Opus 4.5 --- .github/workflows/release.yml | 74 ++++++++--------------------------- 1 file changed, 16 insertions(+), 58 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9783e9d7..85cd66e6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,74 +14,31 @@ jobs: matrix: include: - os: ubuntu-latest - goos: linux - goarch: amd64 - ext: "" + platform: linux/amd64 - os: ubuntu-latest - goos: linux - goarch: arm64 - ext: "" + platform: linux/arm64 - os: macos-latest - goos: darwin - goarch: amd64 - ext: "" - - os: macos-latest - goos: darwin - goarch: arm64 - ext: "" + platform: darwin/universal - os: windows-latest - goos: windows - goarch: amd64 - ext: ".exe" + platform: windows/amd64 runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - - name: Setup Go - uses: actions/setup-go@v6 + - name: Build + uses: host-uk/build@v3 with: - go-version: '1.23' - cache: true - - - name: Build CLI - shell: bash - env: - GOOS: ${{ matrix.goos }} - GOARCH: ${{ matrix.goarch }} - CGO_ENABLED: "0" - run: | - mkdir -p dist - go build -ldflags="-s -w -X main.Version=${{ github.ref_name }}" \ - -o dist/core${{ matrix.ext }} \ - . - - - name: Create archive (Unix) - if: matrix.goos != 'windows' - shell: bash - run: | - cd dist - tar -czvf core-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz core - rm core - - - name: Create archive (Windows) - if: matrix.goos == 'windows' - shell: pwsh - run: | - cd dist - Compress-Archive -Path core.exe -DestinationPath core-${{ matrix.goos }}-${{ matrix.goarch }}.zip - Remove-Item core.exe - - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: core-${{ matrix.goos }}-${{ matrix.goarch }} - path: dist/core-* + build-name: core + build-platform: ${{ matrix.platform }} + build: true + package: true + sign: false release: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Download artifacts uses: actions/download-artifact@v7 @@ -98,8 +55,9 @@ jobs: - name: Create release env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAG_NAME: ${{ github.ref_name }} run: | - gh release create ${{ github.ref_name }} \ - --title "Release ${{ github.ref_name }}" \ + gh release create "$TAG_NAME" \ + --title "Release $TAG_NAME" \ --generate-notes \ release/*