Skip to content

feat(web-ui): paginate and collapse tasks list (#200) #250

feat(web-ui): paginate and collapse tasks list (#200)

feat(web-ui): paginate and collapse tasks list (#200) #250

Workflow file for this run

name: Build and Release CLI
on:
push:
branches:
- main
permissions:
contents: write
jobs:
verify:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
token: ${{ github.token }}
- name: Install dependencies
run: bun install
- name: Install web-ui deps
run: bun install --cwd packages/web-ui
- name: Build web UI
run: bun run build:web
- name: Typecheck
run: bun run typecheck
- name: Test suite
run: bun test
build:
runs-on: ${{ matrix.os }}
needs: verify
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: bun-linux-x64
artifact: ode-linux-x64
- os: windows-latest
target: bun-windows-x64
artifact: ode-windows-x64.exe
- os: macos-15-intel
target: bun-darwin-x64
artifact: ode-darwin-x64
- os: macos-14
target: bun-darwin-arm64
artifact: ode-darwin-arm64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
token: ${{ github.token }}
- name: Install dependencies
run: bun install
- name: Install web-ui deps
run: bun install --cwd packages/web-ui
- name: Build web UI
run: bun run build:web
- name: Embed web UI assets
run: bun run embed:web
- name: Build CLI
run: bun build packages/core/cli.ts --compile --target ${{ matrix.target }} --outfile dist/${{ matrix.artifact }}
- name: Ad-hoc sign macOS binary
if: runner.os == 'macOS'
run: |
set -euo pipefail
bin="dist/${{ matrix.artifact }}"
# Bun --compile may emit a malformed LC_CODE_SIGNATURE that AMFI rejects
# and that codesign refuses to overwrite in place. Strip it first, then
# re-sign ad-hoc so macOS will actually execute the binary.
codesign --remove-signature "$bin" || true
codesign --sign - --force --timestamp=none "$bin"
codesign --verify --verbose=2 "$bin"
codesign -dv "$bin"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: dist/${{ matrix.artifact }}
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Generate checksums
run: |
cd dist
sha256sum ode-* > SHA256SUMS
- name: Read version
id: vars
run: |
version="$(node -p "require('./package.json').version")"
echo "version=${version}" >> "$GITHUB_OUTPUT"
- name: Build release notes
id: notes
shell: bash
run: |
set -euo pipefail
git fetch --tags --force
current_tag="v${{ steps.vars.outputs.version }}"
previous_tag="$(git tag --list 'v*' --sort=-version:refname | grep -vx "${current_tag}" | head -n 1 || true)"
if [[ -n "${previous_tag}" ]]; then
range="${previous_tag}..HEAD"
summary_line="- Changes since \`${previous_tag}\`"
else
first_commit="$(git rev-list --max-parents=0 HEAD | tail -n 1)"
range="${first_commit}..HEAD"
summary_line="- Changes from initial commit"
fi
commit_count="$(git rev-list --count ${range})"
{
echo "body<<EOF"
echo "## Summary"
echo "- Release \`${current_tag}\`"
echo "${summary_line}"
echo "- Total commits: ${commit_count}"
echo
echo "## Commits"
git log --pretty='- %h %s' ${range}
echo "EOF"
} >> "$GITHUB_OUTPUT"
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.vars.outputs.version }}
name: Ode CLI v${{ steps.vars.outputs.version }}
prerelease: false
body: ${{ steps.notes.outputs.body }}
files: |
dist/**/ode-*
dist/SHA256SUMS