diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c2329d8..48e1956 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,6 +47,30 @@ jobs: - name: Build package run: yarn prepack + verify-npm-package: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: "24" + + # Every file sealed in the XCFramework's _CodeSignature must ship, + # otherwise Xcode fails signature collection when archiving. + - name: Verify XCFramework is complete in npm package + run: | + git ls-files ios/TalsecRuntime.xcframework | sort > "$RUNNER_TEMP/expected.txt" + npm pack --dry-run --json --ignore-scripts \ + | node -e 'const [p] = JSON.parse(require("fs").readFileSync(0)); p.files.forEach(f => console.log(f.path))' \ + | grep '^ios/TalsecRuntime.xcframework/' | sort > "$RUNNER_TEMP/packed.txt" + if ! diff "$RUNNER_TEMP/expected.txt" "$RUNNER_TEMP/packed.txt"; then + echo "::error::npm package does not contain the complete TalsecRuntime.xcframework. Check .npmignore." + exit 1 + fi + build-android: runs-on: ubuntu-latest needs: build-library