-
Notifications
You must be signed in to change notification settings - Fork 463
113 lines (92 loc) · 3.29 KB
/
Copy pathelectron-passkeys.yml
File metadata and controls
113 lines (92 loc) · 3.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Electron Passkeys Native Build
on:
workflow_call:
workflow_dispatch:
pull_request:
paths:
- 'packages/electron-passkeys/**'
- '.github/workflows/electron-passkeys.yml'
permissions:
contents: read
actions: read
concurrency:
group: electron-passkeys-${{ github.head_ref || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
name: Build ${{ matrix.settings.target }}
runs-on: ${{ matrix.settings.host }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
settings:
- host: macos-14
target: aarch64-apple-darwin
- host: macos-14
target: x86_64-apple-darwin
- host: windows-latest
target: x86_64-pc-windows-msvc
- host: windows-latest
target: aarch64-pc-windows-msvc
defaults:
run:
working-directory: packages/electron-passkeys
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
- uses: pnpm/action-setup@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.settings.target }}
- uses: Swatinem/rust-cache@v2
with:
workspaces: packages/electron-passkeys
- name: Install dependencies
run: pnpm install --filter @clerk/electron-passkeys... --frozen-lockfile --ignore-scripts
working-directory: .
- name: Build native module
run: pnpm build:native --target ${{ matrix.settings.target }}
- name: Smoke test (host-native targets only)
if: matrix.settings.target == 'aarch64-apple-darwin' || matrix.settings.target == 'x86_64-pc-windows-msvc'
run: node -e "const m = require('./index.js'); console.log('isAvailable:', m.isAvailable(), 'capabilities:', JSON.stringify(m.capabilities())); if (!m.isAvailable()) throw new Error('the loader did not find the freshly built native binary');"
- uses: actions/upload-artifact@v4
with:
name: bindings-${{ matrix.settings.target }}
path: packages/electron-passkeys/electron-passkeys.*.node
if-no-files-found: error
package:
name: Assemble platform packages
needs: build
runs-on: blacksmith-8vcpu-ubuntu-2204
timeout-minutes: 10
defaults:
run:
working-directory: packages/electron-passkeys
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
- uses: pnpm/action-setup@v4
- name: Install dependencies
run: pnpm install --filter @clerk/electron-passkeys... --frozen-lockfile --ignore-scripts
working-directory: .
- uses: actions/download-artifact@v4
with:
path: packages/electron-passkeys/artifacts
- name: Move binaries into per-platform npm packages
run: pnpm artifacts
- name: Verify every platform package contains its binary
run: node scripts/check-electron-passkeys-binaries.mjs packages/electron-passkeys/npm
working-directory: .
- name: Upload assembled platform binaries
uses: actions/upload-artifact@v4
with:
name: electron-passkeys-npm
path: packages/electron-passkeys/npm/**/*.node
if-no-files-found: error