- 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>
74 lines
1.7 KiB
YAML
74 lines
1.7 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [dev, main]
|
|
pull_request:
|
|
branches: [dev, main]
|
|
|
|
env:
|
|
CORE_VERSION: dev
|
|
|
|
jobs:
|
|
qa:
|
|
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 system dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev
|
|
|
|
- name: Install golangci-lint
|
|
uses: golangci/golangci-lint-action@v6
|
|
with:
|
|
install-only: true
|
|
|
|
- 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: Run QA
|
|
run: core go qa
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
needs: qa
|
|
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
|
|
run: core build --targets=linux/amd64,darwin/arm64,windows/amd64 --ci
|
|
|
|
- name: Verify build
|
|
run: |
|
|
ls -la dist/
|
|
chmod +x dist/linux_amd64/core
|
|
dist/linux_amd64/core --version
|