Skip to content

Add note pane keyboard navigation #374

Add note pane keyboard navigation

Add note pane keyboard navigation #374

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
changes:
runs-on: ubuntu-latest
outputs:
app: ${{ steps.filter.outputs.app }}
blossom: ${{ steps.filter.outputs.blossom }}
docs_deploy: ${{ steps.filter.outputs.docs_deploy }}
relay: ${{ steps.filter.outputs.relay }}
www_deploy: ${{ steps.filter.outputs.www_deploy }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
app:
- 'app/**'
- 'turbo.json'
blossom:
- 'blossom/**'
- 'packages/nostr/**'
- 'packages/data/**'
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- 'turbo.json'
docs_deploy:
- 'docs/**'
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
relay:
- 'relay/**'
- 'packages/nostr/**'
- 'packages/data/**'
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- 'turbo.json'
www_deploy:
- 'www/**'
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: pnpm
- name: Install frontend dependencies
run: pnpm install --frozen-lockfile
- name: Check formatting
run: pnpm format:check
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: pnpm
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint, typecheck, and build affected packages
run: pnpm turbo run lint typecheck build --affected
test:
if: needs.changes.outputs.app == 'true'
needs: changes
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: pnpm
- name: Install frontend dependencies
run: pnpm install --frozen-lockfile
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: ./app/src-tauri -> target
- name: Run frontend tests
run: pnpm test
- name: Run Rust tests
run: cargo test --manifest-path app/src-tauri/Cargo.toml
- name: Vite build
run: pnpm build
relay:
if: needs.changes.outputs.relay == 'true'
needs: changes
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_DB: comet_test
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres -d comet_test"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
TEST_DATABASE_URL: postgres://postgres:postgres@127.0.0.1:5432/comet_test
steps:
- uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: pnpm
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install frontend dependencies
run: pnpm install --frozen-lockfile
- name: Build relay
run: pnpm relay:build
- name: Run relay tests
run: pnpm relay:test
blossom:
if: needs.changes.outputs.blossom == 'true'
needs: changes
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_DB: comet_test
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres -d comet_test"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
TEST_DATABASE_URL: postgres://postgres:postgres@127.0.0.1:5432/comet_test
steps:
- uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: pnpm
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install frontend dependencies
run: pnpm install --frozen-lockfile
- name: Build blossom
run: pnpm blossom:build
- name: Run blossom tests
run: pnpm blossom:test
build:
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && needs.changes.outputs.app == 'true'
needs: [changes, format, checks, test]
strategy:
fail-fast: false
matrix:
include:
- platform: macos-latest
args: --target aarch64-apple-darwin
arch: aarch64
- platform: macos-latest
args: --target x86_64-apple-darwin
arch: x86_64
- platform: ubuntu-22.04
args: ""
arch: x86_64-linux
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v6
- name: Install Linux dependencies
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: pnpm
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ startsWith(matrix.platform, 'macos') && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: ./app/src-tauri -> target
- name: Install frontend dependencies
run: pnpm install --frozen-lockfile
- name: Build Tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_CERTIFICATE: ${{ github.event_name == 'push' && secrets.APPLE_CERTIFICATE || '' }}
APPLE_CERTIFICATE_PASSWORD: ${{ github.event_name == 'push' && secrets.APPLE_CERTIFICATE_PASSWORD || '' }}
APPLE_SIGNING_IDENTITY: ${{ github.event_name == 'push' && secrets.APPLE_SIGNING_IDENTITY || '' }}
APPLE_ID: ${{ github.event_name == 'push' && secrets.APPLE_ID || '' }}
APPLE_PASSWORD: ${{ github.event_name == 'push' && secrets.APPLE_PASSWORD || '' }}
APPLE_TEAM_ID: ${{ github.event_name == 'push' && secrets.APPLE_TEAM_ID || '' }}
with:
projectPath: app
args: ${{ matrix.args }}
- name: Upload DMG artifact
if: github.event_name == 'push' && startsWith(matrix.platform, 'macos')
uses: actions/upload-artifact@v4
with:
name: dmg-${{ matrix.arch }}
path: app/src-tauri/target/${{ matrix.arch }}-apple-darwin/release/bundle/dmg/*.dmg
- name: Upload Linux artifacts
if: github.event_name == 'push' && matrix.platform == 'ubuntu-22.04'
uses: actions/upload-artifact@v4
with:
name: linux-${{ matrix.arch }}
path: |
app/src-tauri/target/release/bundle/deb/*.deb
app/src-tauri/target/release/bundle/rpm/*.rpm
app/src-tauri/target/release/bundle/appimage/*.AppImage
release:
if: github.event_name == 'push' && needs.changes.outputs.app == 'true'
needs: [changes, build]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Download DMG artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
pattern: dmg-*
merge-multiple: true
- name: Download Linux artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
pattern: linux-*
merge-multiple: true
- name: List artifacts
run: find artifacts -type f 2>/dev/null || echo "No artifacts found"
- name: Generate short SHA
id: sha
run: echo "short=${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
- name: Generate release notes
id: notes
run: sh .github/scripts/generate-release-notes.sh
- name: Create release
uses: softprops/action-gh-release@v2
with:
tag_name: alpha-${{ steps.sha.outputs.short }}
name: alpha-${{ steps.sha.outputs.short }}
body_path: ${{ steps.notes.outputs.path }}
files: |
artifacts/**/*.dmg
artifacts/**/*.deb
artifacts/**/*.rpm
artifacts/**/*.AppImage
make_latest: true
www_preview:
if: github.event_name == 'pull_request' && needs.changes.outputs.www_deploy == 'true'
needs: [changes, format]
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile --filter @comet/www
- name: Build and deploy preview
id: deploy
run: |
OUTPUT=$(pnpm --filter @comet/www run deploy:preview 2>&1)
echo "$OUTPUT"
URL=$(echo "$OUTPUT" | grep -oP 'https://[^\s]+\.pages\.dev' | head -1)
echo "url=$URL" >> "$GITHUB_OUTPUT"
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
- name: Comment preview URL
if: steps.deploy.outputs.url
uses: marocchino/sticky-pull-request-comment@v2
with:
header: www-preview
message: |
**www preview:** ${{ steps.deploy.outputs.url }}
www_deploy:
if: >-
always() &&
github.event_name == 'push' && github.ref == 'refs/heads/master' &&
needs.format.result == 'success' &&
(needs.changes.outputs.www_deploy == 'true' || needs.release.result == 'success')
needs: [changes, format, release]
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile --filter @comet/www
- name: Build and deploy www
run: pnpm --filter @comet/www run deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
docs_preview:
if: github.event_name == 'pull_request' && needs.changes.outputs.docs_deploy == 'true'
needs: [changes, format]
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile --filter @comet/docs
- name: Build and deploy preview
id: deploy
run: |
OUTPUT=$(pnpm --filter @comet/docs run deploy:preview 2>&1)
echo "$OUTPUT"
URL=$(echo "$OUTPUT" | grep -oP 'https://[^\s]+\.pages\.dev' | head -1)
echo "url=$URL" >> "$GITHUB_OUTPUT"
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
- name: Comment preview URL
if: steps.deploy.outputs.url
uses: marocchino/sticky-pull-request-comment@v2
with:
header: docs-preview
message: |
**docs preview:** ${{ steps.deploy.outputs.url }}
docs_deploy:
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && needs.changes.outputs.docs_deploy == 'true'
needs: [changes, format, checks]
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile --filter @comet/docs
- name: Build and deploy docs
run: pnpm --filter @comet/docs run deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}