Skip to content

Commit 63e5fcb

Browse files
Sync (#149)
* Add encrypted sync via Nostr relay with NIP-CF changes feed Sync engine (sync.rs) connects to a configured relay via WebSocket, authenticates with NIP-42, and subscribes to NIP-CF CHANGES feed for gift-wrapped (NIP-59) events. Notes are encrypted end-to-end — the relay only sees opaque kind:1059 blobs. - SyncManager as Tauri managed state with auto-start on app launch - Note-to-event mapping: notes become kind:30023 rumors, sealed and gift-wrapped to self with NIP-44 encryption - Bidirectional sync: local mutations push to relay with 2s debounce, remote changes upsert locally with last-write-wins resolution - Echo prevention via recently-pushed event ID tracking - Exponential backoff reconnection on disconnect - Sync state reset on relay or identity change - DB migration adds sync_event_id column for deletion targeting - Sync status indicator in sidebar (cloud icons for connected/syncing/error/disconnected) - Seed script updated with stable test keypair and sync_event_id column * formatting * fix package issue * Fix sync deletion to pre-fetch event ID before local delete The sync_event_id must be read before delete_note_permanently destroys the row, and the deletion push should only fire after the local delete succeeds. Pass the pre-fetched ID through the SyncCommand to avoid a redundant query against a now-missing row. * Add Apple code signing and notarization to CI builds on master * Add GitHub release with DMG artifacts on push to master After the build matrix completes, a release job collects the aarch64 and x86_64 DMGs and publishes them as a GitHub release tagged by commit SHA. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 48a2902 commit 63e5fcb

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ jobs:
3535
include:
3636
- platform: macos-latest
3737
args: --target aarch64-apple-darwin
38+
arch: aarch64
3839
- platform: macos-latest
3940
args: --target x86_64-apple-darwin
41+
arch: x86_64
4042

4143
runs-on: ${{ matrix.platform }}
4244
steps:
@@ -63,5 +65,46 @@ jobs:
6365

6466
- name: Build Tauri app
6567
uses: tauri-apps/tauri-action@v0
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70+
APPLE_CERTIFICATE: ${{ github.event_name == 'push' && secrets.APPLE_CERTIFICATE || '' }}
71+
APPLE_CERTIFICATE_PASSWORD: ${{ github.event_name == 'push' && secrets.APPLE_CERTIFICATE_PASSWORD || '' }}
72+
APPLE_SIGNING_IDENTITY: ${{ github.event_name == 'push' && secrets.APPLE_SIGNING_IDENTITY || '' }}
73+
APPLE_ID: ${{ github.event_name == 'push' && secrets.APPLE_ID || '' }}
74+
APPLE_PASSWORD: ${{ github.event_name == 'push' && secrets.APPLE_PASSWORD || '' }}
75+
APPLE_TEAM_ID: ${{ github.event_name == 'push' && secrets.APPLE_TEAM_ID || '' }}
6676
with:
6777
args: ${{ matrix.args }}
78+
79+
- name: Upload DMG artifact
80+
if: github.event_name == 'push'
81+
uses: actions/upload-artifact@v4
82+
with:
83+
name: dmg-${{ matrix.arch }}
84+
path: src-tauri/target/${{ matrix.arch }}-apple-darwin/release/bundle/dmg/*.dmg
85+
86+
release:
87+
if: github.event_name == 'push'
88+
needs: build
89+
runs-on: ubuntu-latest
90+
permissions:
91+
contents: write
92+
steps:
93+
- uses: actions/checkout@v4
94+
95+
- name: Download all DMG artifacts
96+
uses: actions/download-artifact@v4
97+
with:
98+
path: artifacts
99+
pattern: dmg-*
100+
merge-multiple: true
101+
102+
- name: Create release
103+
uses: softprops/action-gh-release@v2
104+
with:
105+
tag_name: build-${{ github.sha }}
106+
name: Build ${{ github.sha }}
107+
body: |
108+
Automated build from commit ${{ github.sha }}.
109+
files: artifacts/*.dmg
110+
make_latest: true

0 commit comments

Comments
 (0)