Skip to content

ENG-1767 Setup Linear release for Obsidian - #1253

Open
trangdoan982 wants to merge 4 commits into
mainfrom
eng-1767-setup-linear-release-for-obsidian-v2
Open

ENG-1767 Setup Linear release for Obsidian#1253
trangdoan982 wants to merge 4 commits into
mainfrom
eng-1767-setup-linear-release-for-obsidian-v2

Conversation

@trangdoan982

@trangdoan982 trangdoan982 commented Jul 27, 2026

Copy link
Copy Markdown
Member

Summary

  • Add a manual stable_obsidian_release.yaml workflow (workflow_dispatch) that publishes an official stable Obsidian version via publish.ts, then syncs and completes the matching Linear release
  • Fix publish.ts so it writes the resolved version back into the local apps/obsidian/package.json/manifest.json (previously only the mirror-repo copy was updated, so the local version field was permanently stale at 0.1.0)
  • One-time correction: bump local package.json/manifest.json from stale 0.1.0 to 1.5.1, matching the actual latest stable release in the discourse-graph-obsidian mirror repo
  • Document the release process in apps/obsidian/README.md

Supersedes closed PR #1074, which used an older 3-workflow design without the merge-time tracking piece. That piece is now split out to ENG-1994 (#1254, stacked on this PR).

Test plan

To test this workflow, I need to merge them first. Rationale:
GitHub only allows manually triggering a workflow_dispatch workflow once its file exists on the default branch (main) — per their docs: "This event will only trigger a workflow run if the workflow file exists on the default branch."

  • js-yaml parse check on the new workflow YAML
  • tsc --noEmit and eslint clean on publish.ts
  • Dry-ran the version-guard bash logic against edge cases (backwards version, re-releasing an already-shipped version, normal beta→stable handoff, skipping straight to a new stable)
  • Manually dispatch stable_obsidian_release.yaml with a real version matching an existing Linear release and confirm the GitHub release, mirror repo push, and Linear sync/complete all succeed

Add a manual stable_obsidian_release.yaml workflow that publishes a
stable Obsidian version and syncs/completes the matching Linear
release. publish.ts now writes the resolved version back into local
package.json/manifest.json (previously only the mirror-repo copy was
updated, so the local version field was permanently stale) so the
workflow's guard step has an accurate baseline to compare against.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Jul 27, 2026

Copy link
Copy Markdown

ENG-1767

@supabase

supabase Bot commented Jul 27, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project zytfjzqyijgagqxrzbmz because there are no changes detected in packages/database/supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
discourse-graph Ready Ready Preview, Comment Jul 27, 2026 3:38pm

Request Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 1 additional finding in Devin Review.

Open in Devin Review

Comment thread apps/obsidian/README.md
A new stable 1.5.2 release was just cut manually, so update the
one-time baseline correction to match instead of the now-stale 1.5.1.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Comment thread .github/workflows/stable_obsidian_release.yaml Outdated
packages/database/src/dbDotEnv.mjs unconditionally overrides
SUPABASE_USE_DB to "implicit" (or "none") whenever running under
GitHub Actions with GITHUB_TEST != "test", regardless of what the
variable is set to. So SUPABASE_USE_DB=production was dead in CI.
SUPABASE_URL/SUPABASE_PUBLISHABLE_KEY alone are enough to trigger the
implicit-mode fallback, same as roam-release.yaml/roam-main.yaml.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Both steps contradicted the documented release process: README step 1
tells maintainers to bump package.json to the target version before
dispatching, but the guard rejected exactly that state as "already
released" (flagged independently by Devin and Graphite review).

roam-release.yaml has no equivalent safeguard at all — it trusts
package.json outright. Do the same here: devs are expected to pass a
sane version, so drop both checks rather than patch the guard to
special-case the pre-bumped state.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@mdroidian

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ea8818f83c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +63 to +64
- name: Complete Linear release
uses: linear/linear-release-action@v0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Make the post-publish steps retryable

If either Linear action fails after the GitHub release has been published—for example, during a transient Linear API failure—rerunning this workflow starts with publish.ts again. Its createGithubRelease function unconditionally creates a release for the same tag, so the duplicate release request fails before the workflow can retry the sync or completion step. Make publishing idempotent or separate the post-publish Linear operations so a partially successful release can be resumed.

Useful? React with 👍 / 👎.

- name: Sync Linear release
uses: linear/linear-release-action@v0
with:
access_key: ${{ secrets.LINEAR_RELEASES_ACCESS_KEY }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This key is already used for the Roam pipeline. I don't think we can reuse this same access key.

@@ -0,0 +1,68 @@
name: Stable Obsidian Release

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's match the naming style of all the other files in this folder

- name: Publish stable release
run: cd apps/obsidian && npx tsx scripts/publish.ts --version ${{ inputs.version }}

- name: Commit version bump

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the intent that the PR changes the manifsest.json and package.json (as the README says), or that the GitHub action will do this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the Github action will do this. Because publish.ts only changes manifest.json and package.json when the version is set to stable (see isExternalRelease)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So should we change the README to reflect this?

run: pnpm install --frozen-lockfile

- name: Publish stable release
run: cd apps/obsidian && npx tsx scripts/publish.ts --version ${{ inputs.version }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

${{ inputs.version }} is inserted into the generated Bash script before it runs. A value like 1.6.0; <command> ends the publisher command and executes the appended command with repository write access and the job’s mirror token and Supabase values.

publish.ts can’t prevent this because Bash parses the separator before Node receives the arguments. Its version regex is also only anchored at the start, so it accepts trailing content when that content reaches Node.

Pass the input through an environment variable, validate it against a fully anchored stable-version pattern, and use a quoted variable:

env:
  VERSION: ${{ inputs.version }}

run: npx tsx scripts/publish.ts --version "$VERSION"

Use the same validated variable in the commit message. This keeps the version as data instead of inserting it into the shell script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants