From a1a8076c97604f58c3984de6b85773a447707ff7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jun 2026 11:33:16 +0000 Subject: [PATCH 1/3] ci: Bump actions/checkout from 4 to 7 Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 7. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a36bd1a..3dd7dac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Set up Node.js uses: actions/setup-node@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d7c377a..32c3494 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Set up Node.js uses: actions/setup-node@v4 From ff5ef13d3249dcd02dc86a7f3090fdd5b9734ca4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jun 2026 11:33:20 +0000 Subject: [PATCH 2/3] ci: Bump actions/setup-node from 4 to 6 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 6. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v4...v6) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a36bd1a..1ab0787 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: "20" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d7c377a..c1c9ff8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: "20" From 3abdc9ade4d6c86dd305833a0d6442d23532f7b2 Mon Sep 17 00:00:00 2001 From: Sangjoon Han Date: Tue, 23 Jun 2026 20:55:32 +0900 Subject: [PATCH 3/3] ci: auto-tag & release on merge to main; add release PR template + CHANGELOG MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - release.yml: trigger on push to `main`; read version from manifest.json and, if not already released, push the bare-version tag and publish the release in the same job. Idempotent — version-less merges (CI/docs) are a no-op. Removes the manual tag-push step. - Add a named release PR template (.github/PULL_REQUEST_TEMPLATE/release.md) for dev->main release PRs. - Add CHANGELOG.md (Keep a Changelog) with the 1.1.1 entry. - CONTRIBUTING: rewrite the releasing section for the automatic flow. Co-Authored-By: Claude Opus 4.8 --- .github/PULL_REQUEST_TEMPLATE/release.md | 42 ++++++++++++++++++ .github/workflows/release.yml | 54 ++++++++++++++++++------ CHANGELOG.md | 33 +++++++++++++++ CONTRIBUTING.md | 30 ++++++++----- 4 files changed, 135 insertions(+), 24 deletions(-) create mode 100644 .github/PULL_REQUEST_TEMPLATE/release.md create mode 100644 CHANGELOG.md diff --git a/.github/PULL_REQUEST_TEMPLATE/release.md b/.github/PULL_REQUEST_TEMPLATE/release.md new file mode 100644 index 0000000..bd257a1 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/release.md @@ -0,0 +1,42 @@ + + +## Release X.Y.Z + + + +## Highlights + + +- + +## Pre-merge checklist + +- [ ] `manifest.json` `version` is set to **X.Y.Z** +- [ ] `versions.json` has `"X.Y.Z": ""` (matches `manifest.minAppVersion`) +- [ ] `CHANGELOG.md` has a dated `## [X.Y.Z]` section (moved out of *Unreleased*) +- [ ] `node --check main.js` and `node scripts/validate.mjs` pass locally +- [ ] CI (`validate`) is green on this PR +- [ ] Code-owner approval obtained + +## After merge (automatic) + +On merge into `main`, the **Release** workflow reads the version from +`manifest.json`, pushes the `X.Y.Z` tag, and publishes the GitHub release with +`main.js`, `manifest.json`, and `styles.css`. If that version is already +released, it does nothing. + +Maintainer follow-up: + +- [ ] Verify the release and its three assets appeared under + [Releases](https://github.com/Post-Math/Lookout/releases). +- [ ] Back-merge `main` into `dev` (a `chore/sync-dev-with-main` PR) to + reconcile history. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 42dc126..228d470 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,16 +1,25 @@ name: Release -# Releases are cut from `main`. Pushing a version tag (e.g. 1.2.0 — no `v` -# prefix, matching manifest.json, per Obsidian's convention) builds the -# release and attaches the plugin artifacts. +# Releases are cut automatically when `main` advances. The job reads the version +# from manifest.json and, if that version has not been released yet, creates and +# pushes the matching tag (bare version, no `v` prefix — Obsidian's convention) +# and publishes the GitHub release with the plugin artifacts. +# +# It is idempotent: a push to `main` that does NOT bump the version (e.g. a CI +# or docs change) finds the tag already exists and does nothing. Tag + release +# happen in the same job, so we don't rely on a tag push triggering a second +# workflow (GITHUB_TOKEN tag pushes don't trigger other workflows). on: push: - tags: - - "[0-9]+.[0-9]+.[0-9]+" + branches: [main] permissions: contents: write +concurrency: + group: release-main + cancel-in-progress: false + jobs: release: name: release @@ -29,20 +38,39 @@ jobs: node --check main.js node scripts/validate.mjs - - name: Verify tag matches manifest version + - name: Read version from manifest + id: meta + run: echo "version=$(node -p "require('./manifest.json').version")" >> "$GITHUB_OUTPUT" + + - name: Check whether this version is already released + id: guard + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - TAG="${GITHUB_REF_NAME}" - VERSION="$(node -p "require('./manifest.json').version")" - if [ "$TAG" != "$VERSION" ]; then - echo "::error::Tag '$TAG' does not match manifest version '$VERSION'." - exit 1 + V="${{ steps.meta.outputs.version }}" + if gh release view "$V" >/dev/null 2>&1 \ + || [ -n "$(git ls-remote --tags origin "refs/tags/$V")" ]; then + echo "exists=true" >> "$GITHUB_OUTPUT" + echo "Version $V already released or tagged — nothing to do." + else + echo "exists=false" >> "$GITHUB_OUTPUT" + echo "Version $V is new — will tag and release." fi + - name: Tag the release commit + if: steps.guard.outputs.exists == 'false' + run: | + V="${{ steps.meta.outputs.version }}" + git tag "$V" + git push origin "$V" + - name: Create GitHub release + if: steps.guard.outputs.exists == 'false' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - gh release create "$GITHUB_REF_NAME" \ + V="${{ steps.meta.outputs.version }}" + gh release create "$V" \ main.js manifest.json styles.css \ - --title "Lookout $GITHUB_REF_NAME" \ + --title "Lookout $V" \ --generate-notes diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..c68cff4 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,33 @@ +# Changelog + +All notable changes to Lookout are documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +_Nothing yet._ + +## [1.1.1] - 2026-06-23 + +Initial public release. + +### Added + +- Mermaid diagrams: pan (drag / wheel), zoom (`Ctrl`/`Cmd`+wheel or buttons), a + 100 % gauge, fit-to-frame, and full-screen — with keyboard controls. +- Tables: a full-screen button for wide tables, in both Reading view and Live + Preview. +- Command: "Open the active note's first Mermaid diagram full screen". + +### Fixed + +- Mermaid: the inline frame now hugs the diagram's natural (100 %) height, so a + short diagram no longer sits inside an oversized frame with dead space. +- Tables: the full-screen button now appears in Live Preview (Obsidian's default + mode), not only in Reading view. The table being actively edited is left + untouched. + +[Unreleased]: https://github.com/Post-Math/Lookout/compare/1.1.1...HEAD +[1.1.1]: https://github.com/Post-Math/Lookout/releases/tag/1.1.1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 71750da..3c48d13 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -100,16 +100,24 @@ Please also: ## Releasing (maintainers) -1. Merge `dev` into `main` via PR. -2. Bump `version` in `manifest.json` and add the matching entry to - `versions.json` (`"": ""`). -3. Tag the release commit on `main` with the bare version (no `v` prefix, to - match Obsidian's convention) and push the tag: - ```bash - git tag 1.2.0 - git push origin 1.2.0 - ``` -4. The **Release** workflow validates the tag against `manifest.json` and - publishes a GitHub release with `main.js`, `manifest.json`, and `styles.css`. +Releases are **automatic on merge to `main`** — there is no manual tagging step. +The version bump lands on `dev` first: + +1. On a branch off `dev`, prepare the release: + - bump `version` in `manifest.json`, + - add the matching entry to `versions.json` (`"": ""`), + - move the `Unreleased` notes in [`CHANGELOG.md`](CHANGELOG.md) into a dated + `## []` section. + + Open a PR into `dev` and merge it. +2. Open a **release PR** from `dev` into `main` using the release template + (append `?expand=1&template=release.md` to the compare URL) and merge it + after a code-owner approval. +3. On merge, the **Release** workflow reads the version from `manifest.json`, + pushes the bare-version tag (no `v` prefix, to match Obsidian's convention), + and publishes a GitHub release with `main.js`, `manifest.json`, and + `styles.css`. It is idempotent — a merge that does not bump the version + (e.g. a CI or docs change) is a no-op. +4. Back-merge `main` into `dev` so the histories stay reconciled. Thank you for contributing! 🛰️