cli/.github/workflows/release.yml
Snider a422c18c0e feat(ci): add core setup ci and dogfood CLI in workflows
- Add `core setup ci` command for generating installation scripts
  - Supports bash, powershell, and GitHub Actions YAML output
  - Configurable via .core/ci.yaml
  - Auto-detects platform and uses Homebrew/Scoop/direct download

- Update all GitHub workflows to use global `core` binary:
  - ci.yml: Uses `core go qa` for all quality checks
  - coverage.yml: Uses `core go cov` for coverage
  - release.yml: Uses `core build --ci` for cross-compilation
  - dev-release.yml: Uses `core build --ci` for all targets

- Add .core/ci.yaml with default configuration

This ensures the CLI dogfoods itself across all CI operations,
validating the framework that the Web3 ecosystem builds from.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 11:36:59 +00:00

81 lines
2 KiB
YAML

name: Release
on:
push:
tags:
- 'v*.*.*'
permissions:
contents: write
env:
CORE_VERSION: dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Install core CLI
run: |
curl -fsSL "https://github.com/host-uk/core/releases/download/${{ env.CORE_VERSION }}/core-linux-amd64" -o /tmp/core
chmod +x /tmp/core
sudo mv /tmp/core /usr/local/bin/core
core --version
- name: Generate code
run: go generate ./pkg/updater/...
- name: Build all targets
run: core build --targets=linux/amd64,linux/arm64,darwin/amd64,darwin/arm64,windows/amd64,windows/arm64 --ci
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: binaries
path: dist/
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: binaries
path: dist
- name: Prepare release files
run: |
mkdir -p release
cp dist/*.tar.gz dist/*.zip dist/CHECKSUMS.txt release/ 2>/dev/null || true
# Also copy raw binaries for direct download
for dir in dist/*/; do
if [ -d "$dir" ]; then
platform=$(basename "$dir")
for bin in "$dir"*; do
if [ -f "$bin" ]; then
name=$(basename "$bin")
cp "$bin" "release/core-${platform//_/-}${name##core}"
fi
done
fi
done
ls -la release/
- name: Create release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ github.ref_name }} \
--title "Release ${{ github.ref_name }}" \
--generate-notes \
release/*