- 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>
107 lines
2.8 KiB
YAML
107 lines
2.8 KiB
YAML
name: Dev Release
|
|
|
|
on:
|
|
push:
|
|
branches: [dev]
|
|
workflow_dispatch:
|
|
|
|
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: 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 }}
|
|
run: |
|
|
gh release create dev \
|
|
--title "Development Build" \
|
|
--notes "Latest development build from the dev branch.
|
|
|
|
**Commit:** ${{ github.sha }}
|
|
**Built:** $(date -u +'%Y-%m-%d %H:%M:%S UTC')
|
|
|
|
## Installation
|
|
|
|
\`\`\`bash
|
|
# macOS/Linux
|
|
curl -fsSL https://github.com/host-uk/core/releases/download/dev/core-linux-amd64 -o core
|
|
chmod +x core && sudo mv core /usr/local/bin/
|
|
|
|
# Or with Homebrew
|
|
brew tap host-uk/tap && brew install host-uk/tap/core
|
|
\`\`\`
|
|
|
|
This is a pre-release for testing. Use tagged releases for production." \
|
|
--prerelease \
|
|
--target dev \
|
|
release/*
|