1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

Add check to Build Desktop workflow for napi/index.d.ts generation (#16458)

This commit is contained in:
neuronull
2025-09-23 14:05:47 -06:00
committed by GitHub
parent d76a60cd1d
commit 6001980dc5

View File

@@ -241,6 +241,15 @@ jobs:
rustup target add x86_64-unknown-linux-musl
node build.js --target=x86_64-unknown-linux-musl --release
- name: Check index.d.ts generated
if: steps.cache.outputs.cache-hit != 'true'
working-directory: apps/desktop/desktop_native
run: |
if ! git diff-index --quiet HEAD -- napi/index.d.ts; then
echo "NAPI index.d.ts doesn't match, make sure to regenerate it and commit it"
exit 1
fi
- name: Build application
run: npm run dist:lin
@@ -376,6 +385,15 @@ jobs:
${{ env.RUNNER_TEMP }}/.cargo/git
key: rust-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('apps/desktop/desktop_native/**/*') }}
- name: Check index.d.ts generated
if: steps.cache.outputs.cache-hit != 'true'
working-directory: apps/desktop/desktop_native
run: |
if ! git diff-index --quiet HEAD -- napi/index.d.ts; then
echo "NAPI index.d.ts doesn't match, make sure to regenerate it and commit it"
exit 1
fi
- name: Build Native Module
if: steps.cache.outputs.cache-hit != 'true'
working-directory: apps/desktop/desktop_native
@@ -501,6 +519,15 @@ jobs:
working-directory: apps/desktop/desktop_native
run: node build.js cross-platform
- name: Check index.d.ts generated
if: steps.cache.outputs.cache-hit != 'true'
working-directory: apps/desktop/desktop_native
run: |
if ! git diff-index --quiet HEAD -- napi/index.d.ts; then
echo "NAPI index.d.ts doesn't match, make sure to regenerate it and commit it"
exit 1
fi
- name: Build
run: npm run build
@@ -864,6 +891,15 @@ jobs:
working-directory: apps/desktop/desktop_native
run: node build.js cross-platform
- name: Check index.d.ts generated
if: steps.cache.outputs.cache-hit != 'true'
working-directory: apps/desktop/desktop_native
run: |
if ! git diff-index --quiet HEAD -- napi/index.d.ts; then
echo "NAPI index.d.ts doesn't match, make sure to regenerate it and commit it"
exit 1
fi
- name: Build application (dev)
run: npm run build