feat(HAI-077): add CI/CD workflows for PRs, releases, and manual testing
- Add CI workflow for pull requests and pushes with lint, test, and build steps - Add release workflow for tagged versions with automated publishing - Add manual test-release workflow for on-demand validation - Add workflow validation tests and remove obsolete build/test files - Update README with CI/CD documentation and badge references
This commit is contained in:
63
.github/workflows/release.yml
vendored
Normal file
63
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Build & Release
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "22"
|
||||
cache: pnpm
|
||||
|
||||
- name: Install Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
|
||||
- name: Build standalone binary
|
||||
run: pnpm build:exe
|
||||
|
||||
- name: Rename binary with platform and arch
|
||||
run: |
|
||||
PLATFORM=$(uname -s | tr '[:upper:]' '[:lower:]')
|
||||
ARCH=$(uname -m)
|
||||
case "$ARCH" in
|
||||
x86_64) ARCH="x64" ;;
|
||||
aarch64) ARCH="arm64" ;;
|
||||
esac
|
||||
cp packages/cli/dist/hai packages/cli/dist/hai-${PLATFORM}-${ARCH}
|
||||
|
||||
- name: Generate checksums
|
||||
run: |
|
||||
cd packages/cli/dist
|
||||
for file in hai-*; do
|
||||
sha256sum "$file" > "${file}.sha256"
|
||||
done
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
generate_release_notes: true
|
||||
files: |
|
||||
packages/cli/dist/hai-*
|
||||
Reference in New Issue
Block a user