diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8ad5e1b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,51 @@ +name: Release + +on: + push: + branches: + - main + - dev + +permissions: + contents: write + issues: write + pull-requests: write + +concurrency: + group: release-${{ github.ref }} + cancel-in-progress: false + +jobs: + release: + name: Release + runs-on: ubuntu-latest + defaults: + run: + working-directory: frontend + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: yarn + cache-dependency-path: frontend/yarn.lock + + - name: Install dependencies + run: yarn install --frozen-lockfile + + # Gate the release: a push to main/dev with failing unit tests must not + # cut a version. (E2E is omitted here — it needs Playwright browsers and + # a live backend; PRs already run the full suite via test.yml.) + - name: Unit tests + run: yarn test + + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: yarn release diff --git a/CLAUDE.md b/CLAUDE.md index b220d13..3e99a8d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -166,7 +166,9 @@ This repo uses **semantic versioning**, and commit titles follow **Conventional Don't dress a real feature as `refactor`/`chore` (it would skip a release) or inflate a refactor into `feat` (it over-bumps). If you squash-merge a PR, the **PR title** becomes the commit message, so it must follow the same convention. -> Release automation is **not** wired up in this repo yet (no `semantic-release`, no tags, `server/package.json` is `0.0.0`) — the convention currently records the *intended* bump. The sibling **subturtle-extension-apps** repo enforces the identical mapping automatically via `semantic-release`. +**Link the ClickUp task:** when the work has a task id, append it as `#` to the commit subject — and to the **PR title** so it survives a squash-merge — e.g. `feat: show dashboard version in a global footer #86exqazkq`. Use the bare id (not the `CU-` branch prefix). The type prefix still drives the version bump; the `#` just keeps `git log` greppable and linkable back to ClickUp. + +> Release automation is wired up for the **frontend** via `semantic-release` ([frontend/release.config.cjs](frontend/release.config.cjs), [.github/workflows/release.yml](.github/workflows/release.yml)) — it owns the version in [frontend/package.json](frontend/package.json) and cuts a tagged release on pushes to `dev`/`main` that contain releasable commits. The **server** has no release pipeline yet (`server/package.json` stays `0.0.0`). The sibling **subturtle-extension-apps** repo enforces the identical mapping via its own `semantic-release` setup. ## Gotchas diff --git a/frontend/components/partial/AppVersionFooter.vue b/frontend/components/partial/AppVersionFooter.vue new file mode 100644 index 0000000..87600aa --- /dev/null +++ b/frontend/components/partial/AppVersionFooter.vue @@ -0,0 +1,14 @@ + + + diff --git a/frontend/layouts/default.vue b/frontend/layouts/default.vue index 38b5c98..0c40fd9 100644 --- a/frontend/layouts/default.vue +++ b/frontend/layouts/default.vue @@ -29,6 +29,10 @@ + +