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
66 changes: 0 additions & 66 deletions .github/workflows/auto-tag.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI

on:
pull_request:
branches:
- main

jobs:
ci:
name: CI
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Lint
run: bun run lint

- name: Typecheck
run: bun run typecheck

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

on:
push:
branches:
- main

jobs:
prepare-release:
name: Prepare Release PR
runs-on: ubuntu-latest
if: "!startsWith(github.event.head_commit.message, 'chore(release):')"
permissions:
contents: write
pull-requests: write

steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Lint
run: bun run lint

- name: Typecheck
run: bun run typecheck

- name: Test
run: bun run test

- name: Determine next version
id: version
run: |
CURRENT=$(node -p "require('./package.json').version")

# Require at least one feat/fix commit since last tag
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
if [ -n "$LAST_TAG" ]; then
RELEASABLE=$(git log "${LAST_TAG}..HEAD" --pretty=format:"%s" \
| grep -cE "^(feat|fix)(\(.+\))?[!]?:" || true)
if [ "$RELEASABLE" -eq 0 ]; then
echo "⏭️ No feat/fix commits since $LAST_TAG — skipping release"
echo "skip=true" >> "$GITHUB_OUTPUT"
exit 0
fi
fi

BUMP=$(./node_modules/.bin/conventional-recommended-bump -p angular)
NEXT=$(node -e "
const parts = '$CURRENT'.split('.').map(Number);
const bump = '$BUMP';
if (bump === 'major') { parts[0]++; parts[1]=0; parts[2]=0; }
else if (bump === 'minor') { parts[1]++; parts[2]=0; }
else { parts[2]++; }
console.log(parts.join('.'));
")

echo "next=$NEXT" >> "$GITHUB_OUTPUT"
echo "skip=false" >> "$GITHUB_OUTPUT"
echo "📦 Next version: $NEXT (bump: $BUMP)"

- name: Check if tag already exists
if: steps.version.outputs.skip == 'false'
id: check_tag
run: |
TAG="v${{ steps.version.outputs.next }}"
if git rev-parse "$TAG" >/dev/null 2>&1; then
echo "🏷️ Tag $TAG already exists — skipping"
echo "exists=true" >> "$GITHUB_OUTPUT"
else
echo "exists=false" >> "$GITHUB_OUTPUT"
fi

- name: Bump version and generate CHANGELOG
if: steps.version.outputs.skip == 'false' && steps.check_tag.outputs.exists == 'false'
run: |
NEXT="${{ steps.version.outputs.next }}"
npm version "$NEXT" --no-git-tag-version
./node_modules/.bin/conventional-changelog -p angular -i CHANGELOG.md -s

- name: Build and move to docs
if: steps.version.outputs.skip == 'false' && steps.check_tag.outputs.exists == 'false'
run: |
bun run build
rm -rf docs && mv dist docs

- name: Create or update release PR
if: steps.version.outputs.skip == 'false' && steps.check_tag.outputs.exists == 'false'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
NEXT="${{ steps.version.outputs.next }}"
BRANCH="release/v${NEXT}"

git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

git checkout -B "$BRANCH"
git add package.json CHANGELOG.md docs/
git commit -m "chore(release): v${NEXT}"
git push origin "$BRANCH" --force

EXISTING=$(gh pr list --head "$BRANCH" --base main --json number --jq '.[0].number' 2>/dev/null || echo "")
if [ -z "$EXISTING" ]; then
gh pr create \
--title "chore(release): v${NEXT}" \
--body "$(cat <<EOF
## Release v${NEXT}

Automated release PR — merge to publish the GitHub release.

- Bumps \`package.json\` to \`${NEXT}\`
- Updates \`CHANGELOG.md\`
- Rebuilds \`docs/\` bundle

> ⚠️ Use **squash merge** with the default commit title to trigger the finalize workflow.
EOF
)" \
--base main \
--head "$BRANCH"
echo "✅ Created release PR for v${NEXT}"
else
echo "🔄 Release PR #${EXISTING} already exists — branch updated"
fi

finalize-release:
name: Finalize Release
runs-on: ubuntu-latest
if: "startsWith(github.event.head_commit.message, 'chore(release):')"
permissions:
contents: write

steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- name: Get version
id: get_version
run: |
VERSION=$(node -p "require('./package.json').version")
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "tag=v$VERSION" >> "$GITHUB_OUTPUT"
echo "📦 Releasing v$VERSION"

- name: Create tag
run: |
TAG="${{ steps.get_version.outputs.tag }}"
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag -a "$TAG" -m "Release $TAG"
git push origin "$TAG"
echo "✅ Created tag $TAG"

- name: Extract release notes
id: notes
run: |
VERSION="${{ steps.get_version.outputs.version }}"
# Extract the block between the first and second version headers in CHANGELOG.md
awk "/^#+ \[?${VERSION//./\\.}/"'{found=1; next} found && /^#+ \[/{exit} found{print}' CHANGELOG.md \
> /tmp/release-notes.md
if [ ! -s /tmp/release-notes.md ]; then
echo "Release ${{ steps.get_version.outputs.tag }}" > /tmp/release-notes.md
fi

- name: Create GitHub Release
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
with:
tag_name: ${{ steps.get_version.outputs.tag }}
name: Release ${{ steps.get_version.outputs.tag }}
body_path: /tmp/release-notes.md

- name: Delete release branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION="${{ steps.get_version.outputs.version }}"
git push origin --delete "release/v${VERSION}" 2>/dev/null \
|| echo "Branch release/v${VERSION} not found or already deleted"
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Open source collection of web developer utilities.
The web application has been deployed and you can use it [just here!](https://amwebexpert.github.io/etoolbox)

<div align="center">
<img src="public/icon-512x512.png" width="100" alt="Web Toolbox" />
<div>Like the project? Don't forget to give it a ⭐️!</div>
<div>Icon made by: <a href="https://therealjerrylow.com/">Jerry Low</a></div>
</div>
Expand All @@ -26,12 +25,6 @@ The web application has been deployed and you can use it [just here!](https://am
- Industry Best Practices
- Serve as an exemplary codebase demonstrating optimal coding patterns, clean architecture, and modern development standards for the industry

Some screen captures of the implemented features...

| JSON format | File encoder | RegEx tester | Imaging OCR |
| ----------------------------------------------------------- | ---------------------------------------------------------- | --------------------------------------------------------- | ------------------------------------------------------ |
| <img src="public/screen-captures/JSONFormatter-demo.gif" /> | <img src="public/screen-captures/ImageEncoder-demo.gif" /> | <img src="public/screen-captures/RegexTester-demo.gif" /> | <img src="public/screen-captures/ImageOCR-demo.gif" /> |

## Development commands

| Script | Description |
Expand Down
2 changes: 1 addition & 1 deletion ai-orchestrator/orchestrator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { isNotBlank } from "@lichens-innovation/ts-common";
import { logger } from "@lichens-innovation/ts-common/logger";
import { z } from "zod";

import { setAgentLogDir } from "./utils/agent-logger.utils.ts";
import { loadPrompt, runAgent, runTypedAgent } from "./utils/agent.utils.ts";
import { setAgentLogDir } from "./utils/agent-logger.utils.ts";
import type { Issue, IssueWorktreeResult, OrchestratorOptions } from "./utils/orchestrator.types.ts";
import { Plan } from "./utils/plan.ts";
import { deleteBranch, getCurrentHead, hasCommits, withWorktree } from "./utils/worktree.utils.ts";
Expand Down
Loading
Loading