mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 13:53:34 +00:00
Fix false positive CI check for index.d.ts generation (#16579)
* Fix false positive CI check for index.d.ts generation * use event * lint: use env var * use sha not ref * only run in one platform * simplify * one platform
This commit is contained in:
45
.github/workflows/build-desktop.yml
vendored
45
.github/workflows/build-desktop.yml
vendored
@@ -241,15 +241,6 @@ jobs:
|
|||||||
rustup target add x86_64-unknown-linux-musl
|
rustup target add x86_64-unknown-linux-musl
|
||||||
node build.js --target=x86_64-unknown-linux-musl --release
|
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
|
- name: Build application
|
||||||
run: npm run dist:lin
|
run: npm run dist:lin
|
||||||
|
|
||||||
@@ -385,15 +376,6 @@ jobs:
|
|||||||
${{ env.RUNNER_TEMP }}/.cargo/git
|
${{ env.RUNNER_TEMP }}/.cargo/git
|
||||||
key: rust-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('apps/desktop/desktop_native/**/*') }}
|
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
|
- name: Build Native Module
|
||||||
if: steps.cache.outputs.cache-hit != 'true'
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
working-directory: apps/desktop/desktop_native
|
working-directory: apps/desktop/desktop_native
|
||||||
@@ -405,6 +387,15 @@ jobs:
|
|||||||
rustup target add aarch64-unknown-linux-musl
|
rustup target add aarch64-unknown-linux-musl
|
||||||
node build.js --target=aarch64-unknown-linux-musl --release
|
node build.js --target=aarch64-unknown-linux-musl --release
|
||||||
|
|
||||||
|
- name: Check index.d.ts generated
|
||||||
|
if: github.event_name == 'pull_request' && steps.cache.outputs.cache-hit != 'true'
|
||||||
|
working-directory: apps/desktop/desktop_native
|
||||||
|
run: |
|
||||||
|
if ! git diff --quiet --name-only -- 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
|
- name: Build application
|
||||||
run: npm run dist:lin:arm64
|
run: npm run dist:lin:arm64
|
||||||
|
|
||||||
@@ -519,15 +510,6 @@ jobs:
|
|||||||
working-directory: apps/desktop/desktop_native
|
working-directory: apps/desktop/desktop_native
|
||||||
run: node build.js cross-platform
|
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
|
- name: Build
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
@@ -891,15 +873,6 @@ jobs:
|
|||||||
working-directory: apps/desktop/desktop_native
|
working-directory: apps/desktop/desktop_native
|
||||||
run: node build.js cross-platform
|
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)
|
- name: Build application (dev)
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user