Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]

jobs:
test:
name: Build and Test
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install dependencies
run: bun install

- name: Build UI
run: bun run src/ui/build.ts

- name: Type check
run: bunx tsc --noEmit

- name: Lint
run: bunx biome check src/

- name: Build binary
run: bun build src/cli.ts --compile --outfile katana

- name: Test binary
run: |
chmod +x katana
./katana --version
./katana --help
42 changes: 0 additions & 42 deletions .github/workflows/full-tests.yml

This file was deleted.

93 changes: 0 additions & 93 deletions .github/workflows/module-tests.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/package-test.yaml

This file was deleted.

70 changes: 70 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Release

on:
push:
tags:
- 'v*'

permissions:
contents: write

jobs:
release:
name: Create Release
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install dependencies
run: bun install

- name: Build UI
run: bun run src/ui/build.ts

- name: Build binary for Linux
run: |
bun build src/cli.ts --compile --target=bun-linux-x64 --outfile katana-linux-x64
chmod +x katana-linux-x64

- name: Test binary
run: |
./katana-linux-x64 --version
./katana-linux-x64 --help

- name: Extract version from tag
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT

- name: Extract changelog for this version
id: changelog
run: |
if [ -f CHANGELOG.md ]; then
# Extract changelog section for this version
awk '/^## \[${{ steps.get_version.outputs.VERSION }}\]/{flag=1;next}/^## \[/{flag=0}flag' CHANGELOG.md > release_notes.md
if [ ! -s release_notes.md ]; then
echo "Release ${{ steps.get_version.outputs.VERSION }}" > release_notes.md
echo "" >> release_notes.md
echo "See [CHANGELOG.md](CHANGELOG.md) for details." >> release_notes.md
fi
else
echo "Release ${{ steps.get_version.outputs.VERSION }}" > release_notes.md
fi

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
name: Katana ${{ steps.get_version.outputs.VERSION }}
body_path: release_notes.md
files: |
katana-linux-x64
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading