-
Notifications
You must be signed in to change notification settings - Fork 5
ENG-1767 Setup Linear release for Obsidian #1074
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
trangdoan982
wants to merge
9
commits into
main
Choose a base branch
from
eng-1767-setup-linear-release-for-obsidian
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+115
−1
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
06ceff5
ENG-1767 Add Obsidian Linear release workflows
trangdoan982 af5bb22
add to test
trangdoan982 db6d8f3
further test
trangdoan982 7b7c14d
test 3
trangdoan982 e837eff
fix bug
trangdoan982 ae6177b
debug instrument
trangdoan982 ab4e9e3
add debug log
trangdoan982 50e349e
cleanup debug instrument
trangdoan982 4424c07
final cleanup
trangdoan982 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| name: Complete Obsidian Linear Release | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: "Obsidian release version to complete in Linear, for example 0.1.0." | ||
| required: true | ||
| type: string | ||
|
|
||
| jobs: | ||
| complete-release: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout Code | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Complete Linear release | ||
| id: complete-linear-release | ||
| if: ${{ inputs.version != '' }} | ||
| uses: linear/linear-release-action@v0 | ||
| with: | ||
| access_key: ${{ secrets.LINEAR_RELEASES_ACCESS_KEY_OBSIDIAN }} | ||
| command: complete | ||
| version: ${{ inputs.version }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| name: Publish Obsidian Plugin | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: "Obsidian release version, for example 0.1.0 or 0.1.0-beta.1." | ||
| required: true | ||
| type: string | ||
| release_name: | ||
| description: "Optional custom GitHub release name." | ||
| required: false | ||
| type: string | ||
|
|
||
| env: | ||
| OBSIDIAN_PLUGIN_REPO_TOKEN: ${{ secrets.OBSIDIAN_PLUGIN_REPO_TOKEN }} | ||
| SUPABASE_URL: ${{ secrets.SUPABASE_URL }} | ||
| SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }} | ||
| SUPABASE_PUBLISHABLE_KEY: ${{ secrets.SUPABASE_PUBLISHABLE_KEY }} | ||
| SUPABASE_USE_DB: production | ||
|
|
||
| jobs: | ||
| publish-extension: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout Code | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Install pnpm | ||
| uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 10.15.1 | ||
| run_install: false | ||
|
|
||
| - name: Setup Node.js environment | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20 | ||
| cache: "pnpm" | ||
|
|
||
| - name: Install Dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Resolve release inputs | ||
| id: resolve-release-inputs | ||
| run: | | ||
| if [ -n "${{ inputs.version }}" ]; then | ||
| version="${{ inputs.version }}" | ||
| else | ||
| base_version="$(node -p "require('./apps/obsidian/package.json').version")" | ||
| version="${base_version}-alpha-ci.${{ github.run_number }}" | ||
| fi | ||
| echo "version=$version" >> "$GITHUB_OUTPUT" | ||
|
|
||
| if [ -n "${{ inputs.release_name }}" ]; then | ||
| release_name="${{ inputs.release_name }}" | ||
| else | ||
| release_name="" | ||
| fi | ||
| echo "release_name=$release_name" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Sync Linear release | ||
| id: sync-linear-release | ||
| uses: linear/linear-release-action@v0 | ||
| with: | ||
| access_key: ${{ secrets.LINEAR_RELEASES_ACCESS_KEY_OBSIDIAN }} | ||
| name: Obsidian ${{ steps.resolve-release-inputs.outputs.version }} | ||
| version: ${{ steps.resolve-release-inputs.outputs.version }} | ||
| include_paths: "apps/obsidian/**,packages/tailwind-config/**,packages/utils/**,packages/database/**,packages/ui/**" | ||
|
|
||
| - name: Publish Obsidian extension | ||
| run: | | ||
| if [ -n "${{ steps.resolve-release-inputs.outputs.release_name }}" ]; then | ||
| pnpm --dir apps/obsidian run publish --version "${{ steps.resolve-release-inputs.outputs.version }}" --release-name "${{ steps.resolve-release-inputs.outputs.release_name }}" | ||
| else | ||
| pnpm --dir apps/obsidian run publish --version "${{ steps.resolve-release-inputs.outputs.version }}" | ||
| fi | ||
|
|
||
| - name: Mark Linear release Released | ||
| id: update-linear-release | ||
| if: ${{ steps.sync-linear-release.outputs.release != '' && steps.sync-linear-release.outputs.release != 'null' }} | ||
| uses: linear/linear-release-action@v0 | ||
| with: | ||
| access_key: ${{ secrets.LINEAR_RELEASES_ACCESS_KEY_OBSIDIAN }} | ||
| command: update | ||
| version: ${{ steps.resolve-release-inputs.outputs.version }} | ||
| stage: Released | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow updates the Linear release to
Releasedimmediately after running publish, which prematurely marks the release as shipped even though a separateobsidian-release-complete.yamlmanual completion flow was added for finalization. In practice this bypasses the intended review gate (analogous to the Roam flow’s “Sent to … for Review” stage) and can cause release tracking in Linear to report production release before Obsidian review is actually complete.Useful? React with 👍 / 👎.