-
Notifications
You must be signed in to change notification settings - Fork 21
feat(desktop): in-app auto-update via CrabNebula Cloud #257
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
matheusfillipe
wants to merge
3
commits into
main
Choose a base branch
from
feat/desktop-auto-update
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.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
ff582de
feat(desktop): in-app auto-update via CrabNebula Cloud
matheusfillipe cb9c05a
refactor(updater): match app progress-bar style (discord-blue, h-1.5)
matheusfillipe d55fa56
fix: correct AGENTS.md updater refs (desktop.json, isTauriDesktop) + …
matheusfillipe 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,104 @@ | ||
| name: 'CrabNebula Desktop Release' | ||
|
|
||
| # Desktop auto-update channel → CrabNebula Cloud. Mobile ships via the stores (publish.yaml). | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| tags: | ||
| - 'v*.*.*' | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| env: | ||
| CN_APPLICATION: 'obsidianirc/obsidianirc' | ||
|
|
||
| jobs: | ||
| draft: | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
| - name: create draft release | ||
| uses: crabnebula-dev/cloud-release@1a8803698ba41de6b23e42abc5dcc3721308233c # v0 | ||
| with: | ||
| command: release draft ${{ env.CN_APPLICATION }} --framework tauri | ||
| api-key: ${{ secrets.CN_API_KEY }} | ||
|
|
||
| build: | ||
| needs: draft | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - platform: 'macos-latest' # Arm-based macs (M1+) | ||
| args: '--target aarch64-apple-darwin' | ||
| - platform: 'macos-latest' # Intel macs | ||
| args: '--target x86_64-apple-darwin' | ||
| - platform: 'ubuntu-22.04' # 22.04 for glibc 2.35 compatibility | ||
| args: '' | ||
| - platform: 'windows-latest' | ||
| args: '' | ||
| runs-on: ${{ matrix.platform }} | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: install dependencies (ubuntu only) | ||
| if: matrix.platform == 'ubuntu-22.04' | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev patchelf pkg-config | ||
|
|
||
| - name: setup node | ||
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | ||
| with: | ||
| node-version: lts/* | ||
| cache: 'npm' | ||
|
|
||
| - name: install Rust stable | ||
| uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable | ||
| with: | ||
| targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} | ||
|
|
||
| - name: Rust cache | ||
| uses: swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | ||
| with: | ||
| workspaces: './src-tauri -> target' | ||
|
|
||
| - name: install frontend dependencies | ||
| run: npm install | ||
|
|
||
| - name: build Tauri app | ||
| # --config adds createUpdaterArtifacts so only this build signs update artifacts | ||
| run: npm run tauri build -- ${{ matrix.args }} --config src-tauri/tauri.updater.conf.json | ||
| env: | ||
| TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | ||
| TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | ||
|
|
||
| - name: upload assets | ||
| uses: crabnebula-dev/cloud-release@1a8803698ba41de6b23e42abc5dcc3721308233c # v0 | ||
| with: | ||
| command: release upload ${{ env.CN_APPLICATION }} --framework tauri | ||
| api-key: ${{ secrets.CN_API_KEY }} | ||
| path: ./src-tauri | ||
|
|
||
| publish: | ||
| needs: build | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
| - name: publish release | ||
| uses: crabnebula-dev/cloud-release@1a8803698ba41de6b23e42abc5dcc3721308233c # v0 | ||
| with: | ||
| command: release publish ${{ env.CN_APPLICATION }} --framework tauri | ||
| api-key: ${{ secrets.CN_API_KEY }} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.
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.
Uh oh!
There was an error while loading. Please reload this page.