Repository navigation
110 lines (90 loc) · 3.73 KB
/
Copy pathelectron-passkeys.yml
File metadata and controls
110 lines (90 loc) · 3.73 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
name: Electron Passkeys Native Build
on:
workflow_dispatch:
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@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 24
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
with:
toolchain: stable
targets: ${{ matrix.settings.target }}
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # 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@ea165f8d65b6e75b540449e92b4886f43607fa02 # 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@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 24
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
- name: Install dependencies
run: pnpm install --filter @clerk/electron-passkeys... --frozen-lockfile --ignore-scripts
working-directory: .
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # 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@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: electron-passkeys-npm
path: packages/electron-passkeys/npm/**/*.node
if-no-files-found: error
retention-days: 90