Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

ci: auto-tag on release commit, remove local tag dependency (#223)

Generb09010aca533
diff --git a/.github/workflows/auto-tag-release.yml b/.github/workflows/auto-tag-release.yml
new file mode 100644
index 000000000..e2076dafd
--- /dev/null
+++ b/.github/workflows/auto-tag-release.yml
@@ -0,0 +1,56 @@
+name: Auto-Tag & Release
+
+on:
+ push:
+ branches: [main]
+
+jobs:
+ auto-tag-release:
+ name: Tag & Release
+ if: "startsWith(github.event.head_commit.message, 'release: v')"
+ runs-on: ubuntu-latest
+ timeout-minutes: 5
+ permissions:
+ contents: write
+ steps:
+ - uses: actions/checkout@v6
+ with:
+ fetch-tags: true
+
+ - name: Extract version from commit message
+ id: version
+ env:
+ COMMIT_MSG: ${{ github.event.head_commit.message }}
+ run: |
+ VERSION=$(echo "$COMMIT_MSG" | grep -oP '^release: v\K[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?')
+ if [ -z "$VERSION" ]; then
+ echo "No version found in commit message, skipping."
+ exit 1
+ fi
+ TAG="v${VERSION}"
+ echo "tag=$TAG" >> "$GITHUB_OUTPUT"
+ echo "Detected tag: $TAG"
+
+ - name: Check if tag already exists
+ id: check
+ run: |
+ if git tag -l "${{ steps.version.outputs.tag }}" | grep -q .; then
+ echo "Tag ${{ steps.version.outputs.tag }} already exists, skipping."
+ echo "exists=true" >> "$GITHUB_OUTPUT"
+ else
+ echo "exists=false" >> "$GITHUB_OUTPUT"
+ fi
+
+ - name: Create and push tag
+ if: steps.check.outputs.exists == 'false'
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ git tag "${{ steps.version.outputs.tag }}"
+ git push origin "${{ steps.version.outputs.tag }}"
+
+ - name: Create GitHub Release
+ if: steps.check.outputs.exists == 'false'
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: gh release create "${{ steps.version.outputs.tag }}" --generate-notes --title "${{ steps.version.outputs.tag }}"
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 4021f617f..85d841586 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -3,7 +3,6 @@ name: CI
on:
push:
branches: [main]
- tags: ['v*']
paths-ignore: ['**/*.md']
pull_request:
branches: [main]
@@ -51,7 +50,7 @@ jobs:
e2e:
name: E2E Tests
- if: github.event_name == 'pull_request' || startsWith(github.ref, 'refs/tags/')
+ if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 15
env:
@@ -102,7 +101,7 @@ jobs:
coverage:
name: Coverage
- if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'pull_request'
+ if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
@@ -143,18 +142,3 @@ jobs:
- name: Lighthouse CI
working-directory: src/web
run: npx @lhci/cli autorun --config=lighthouserc.json && node scripts/print-lighthouse-scores.mjs
-
- release:
- name: GitHub Release
- if: startsWith(github.ref, 'refs/tags/v')
- needs: [quality, test, build, coverage]
- runs-on: ubuntu-latest
- timeout-minutes: 5
- permissions:
- contents: write
- steps:
- - uses: actions/checkout@v6
- - name: Create GitHub Release
- env:
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: gh release create "${{ github.ref_name }}" --generate-notes --title "${{ github.ref_name }}"
diff --git a/AGENTS.md b/AGENTS.md
index ed8b32a2c..5995b9ece 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -21,17 +21,17 @@ pnpm bump 0.0.11 # explicit version (v prefix optional)
pnpm bump patch # auto-increment patch/minor/major
pnpm bump patch --min-cli # also update MIN_CLI_VERSION in src/web/wrangler.toml
```
-This updates every `src/*/package.json`, commits `release: vX.Y.Z`, and creates a local `vX.Y.Z` git tag.
+This updates every `src/*/package.json` and commits `release: vX.Y.Z`.
Add `--min-cli` when the release contains breaking changes that require users to update their CLI.
After reviewing the commit:
```bash
-git push origin main --tags
+git push origin main
```
This triggers:
- **CI** — typecheck, lint, tests, coverage (uploaded to Codecov)
-- **Unified GitHub Release** — auto-created with generated changelog after all CI checks pass
+- **Auto-Tag & Release** — CI detects the `release: vX.Y.Z` commit message, creates the git tag, and creates a GitHub Release with generated changelog (`auto-tag-release.yml`)
- **@alook/cli** → auto-published to npm via `publish-cli.yml` (watches `src/cli/package.json`)
- **@alook/app** → auto-published to npm via `publish-app.yml` (watches `src/app/package.json`)
- **CF Workers** → each module redeploys when its own `package.json` changes
diff --git a/scripts/bump-version.mjs b/scripts/bump-version.mjs
index 1230d9122..90851af82 100644
--- a/scripts/bump-version.mjs
+++ b/scripts/bump-version.mjs
@@ -77,9 +77,8 @@ if (updateMinCli) {
const gitFiles = files.map((f) => f.replace(ROOT + "/", ""));
execSync(`git add ${gitFiles.join(" ")}`, { cwd: ROOT, stdio: "inherit" });
execSync(`git commit -m "release: v${version}"`, { cwd: ROOT, stdio: "inherit" });
-execSync(`git tag v${version}`, { cwd: ROOT, stdio: "inherit" });
-console.log(`\n✅ Committed and tagged: v${version}`);
+console.log(`\n✅ Committed: v${version}`);
console.log(`\n👉 Next steps:`);
-console.log(` git push origin main --tags`);
-console.log(` # CI will auto-publish @alook/cli and trigger CF deployments\n`);
+console.log(` git push origin main`);
+console.log(` # CI will auto-tag, create GitHub Release, and trigger deployments\n`);
diff --git a/src/web/src/test/e2e/meeting-crud.test.ts b/src/web/src/test/e2e/meeting-crud.test.ts
index 6906d90c3..de3e7bf9d 100644
--- a/src/web/src/test/e2e/meeting-crud.test.ts
+++ b/src/web/src/test/e2e/meeting-crud.test.ts
@@ -144,12 +144,28 @@ describe("meeting CRUD", () => {
describe("meeting approve flow", () => {
let pendingId: string
- beforeAll(() => {
- // Directly insert a pending meeting (simulating non-whitelisted ICS)
- const now = new Date().toISOString()
- pendingId = `ms_e2e_pending_${Date.now()}`
- sqlRun(`INSERT INTO meeting_session (id, agent_id, workspace_id, title, meeting_url, status, is_whitelisted, participants, scheduled_at, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`, pendingId, seed.agentId, seed.workspaceId, 'Pending Meeting', 'https://meet.google.com/pen-ding-one', 'pending', 0, '[]', '2026-05-03T10:00:00Z', now, now)
- })
+ beforeAll(async () => {
+ // Create via API (so the record exists in miniflare's D1), then UPDATE status via sqlRun
+ // to simulate a non-whitelisted ICS meeting (no public API for creating pending meetings).
+ const createRes = await meetingReq(
+ `/api/agents/${seed.agentId}/meetings?workspace_id=${seed.workspaceId}`,
+ seed.machineToken,
+ {
+ method: "POST",
+ body: JSON.stringify({
+ meetingUrl: "https://meet.google.com/pen-ding-one",
+ title: "Pending Meeting",
+ scheduledAt: "2026-05-03T10:00:00Z",
+ }),
+ },
+ )
+ expect(createRes.status).toBe(201)
+ const created = await createRes.json() as Record<string, unknown>
+ expect(created.id).toBeTruthy()
+ pendingId = created.id as string
+ // Mutate status to 'pending' to simulate a non-whitelisted ICS meeting
+ sqlRun(`UPDATE meeting_session SET status = 'pending', is_whitelisted = 0 WHERE id = ?`, pendingId)
+ }, 30_000)
it("POST /approve transitions pending → scheduled", async () => {
const res = await meetingReq(
@@ -189,7 +205,9 @@ describe("meeting stop on non-active", () => {
}),
},
)
+ expect(createRes.status).toBe(201)
const created = await createRes.json() as Record<string, unknown>
+ expect(created.id).toBeTruthy()
const res = await meetingReq(
`/api/agents/${seed.agentId}/meetings/${created.id}/stop?workspace_id=${seed.workspaceId}`,