@@ -168,6 +168,87 @@ jobs:
168168 ${{ github.workspace }}/packages/core/*.tgz
169169 ${{ github.workspace }}/packages/expo-upload-sourcemaps/*.tgz
170170
171+ job_validate_tarball :
172+ name : Validate tarball
173+ runs-on : ["ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04", "runner_group_id:10"]
174+ needs : [job_build, diff_check]
175+ if : ${{ needs.diff_check.outputs.skip_ci != 'true' }}
176+ timeout-minutes : 5
177+ steps :
178+ - uses : actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
179+ with :
180+ node-version : 18
181+ - name : Download tarball artifacts
182+ uses : actions/download-artifact@v8
183+ with :
184+ name : ${{ github.sha }}
185+ path : artifacts
186+ - name : Verify executable bits in tarball
187+ run : |
188+ set -e
189+ TARBALL=$(find artifacts -name 'sentry-react-native-*.tgz' -print -quit)
190+ [ -n "$TARBALL" ] || { echo "::error::tarball not found in artifacts/"; exit 1; }
191+ echo "Tarball: $TARBALL"
192+ FAILED=0
193+ for entry in package/scripts/sentry-xcode.sh \
194+ package/scripts/sentry-xcode-debug-files.sh \
195+ package/scripts/collect-modules.sh \
196+ package/scripts/eas-build-hook.js \
197+ package/scripts/expo-upload-sourcemaps.js; do
198+ mode=$(tar -tvf "$TARBALL" "$entry" 2>/dev/null | awk 'NR==1{print $1}')
199+ if [ -z "$mode" ]; then
200+ echo "::error::$entry missing from tarball"
201+ FAILED=1
202+ elif [ "$mode" != "-rwxr-xr-x" ]; then
203+ echo "::error::$entry has mode $mode, expected -rwxr-xr-x"
204+ FAILED=1
205+ else
206+ echo "OK: $entry ($mode)"
207+ fi
208+ done
209+ exit $FAILED
210+ - name : Install tarball into fresh project
211+ run : |
212+ set -e
213+ CORE_TARBALL=$(find "$PWD/artifacts" -name 'sentry-react-native-*.tgz' -print -quit)
214+ EXPO_TARBALL=$(find "$PWD/artifacts" -name 'sentry-expo-upload-sourcemaps-*.tgz' -print -quit)
215+ [ -n "$CORE_TARBALL" ] || { echo "::error::core tarball not found"; exit 1; }
216+ [ -n "$EXPO_TARBALL" ] || { echo "::error::expo-upload-sourcemaps tarball not found"; exit 1; }
217+ mkdir -p /tmp/install-test
218+ cd /tmp/install-test
219+ npm init -y >/dev/null
220+ # Install both local tarballs together so the @sentry/expo-upload-sourcemaps
221+ # cross-dep is satisfied locally. On a release branch the bumped version
222+ # is not on the npm registry yet (workspace:* resolves to the version
223+ # we are about to publish), and a registry fetch would fail with ETARGET.
224+ npm install --no-save "$EXPO_TARBALL" "$CORE_TARBALL"
225+ # workspace:* spec must have been resolved by yarn pack (#6037 regression)
226+ if grep -q 'workspace:' node_modules/@sentry/react-native/package.json; then
227+ echo "::error::published package.json still contains unresolved workspace: spec"
228+ grep workspace: node_modules/@sentry/react-native/package.json
229+ exit 1
230+ fi
231+ # bin entries must be linked into node_modules/.bin and executable
232+ for bin in sentry-eas-build-on-complete \
233+ sentry-eas-build-on-error \
234+ sentry-eas-build-on-success \
235+ sentry-expo-upload-sourcemaps; do
236+ if [ ! -x "node_modules/.bin/$bin" ]; then
237+ echo "::error::node_modules/.bin/$bin missing or not executable"
238+ ls -la node_modules/.bin/ | grep -i sentry || true
239+ exit 1
240+ fi
241+ echo "OK: node_modules/.bin/$bin"
242+ done
243+ # sentry-xcode.sh is invoked directly by the iOS build phase, so it
244+ # must remain executable after install (#6047)
245+ if [ ! -x node_modules/@sentry/react-native/scripts/sentry-xcode.sh ]; then
246+ echo "::error::scripts/sentry-xcode.sh is not executable after install"
247+ ls -la node_modules/@sentry/react-native/scripts/sentry-xcode.sh
248+ exit 1
249+ fi
250+ echo "OK: scripts/sentry-xcode.sh executable"
251+
171252 job_type_check :
172253 name : Type Check Typescript 3.8
173254 runs-on : ["ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04", "runner_group_id:10"]
0 commit comments