@@ -75,21 +75,19 @@ jobs:
7575 {
7676 echo 'matrix<<MATRIX_EOF'
7777 if [[ "${{ github.event_name }}" == "pull_request" ]]; then
78- # PRs build linux-x64 (smoke test + e2e) and linux-x64-musl (Alpine smoke test)
78+ # PRs build linux-x64 (smoke test + e2e)
7979 echo '{"include":[
80- {"target":"linux-x64", "os":"ubuntu-latest", "can-test":true},
81- {"target":"linux-x64-musl", "os":"ubuntu-latest", "can-test":false}
80+ {"target":"linux-x64", "os":"ubuntu-latest", "can-test":true}
8281 ]}'
8382 else
84- # main, release/**, workflow_call: full cross-platform matrix
83+ # main, release/**, workflow_call: full cross-platform matrix.
84+ # All targets cross-compiled from ubuntu-latest via fossilize.
8585 echo '{"include":[
86- {"target":"darwin-arm64", "os":"macos-latest", "can-test":true},
87- {"target":"linux-x64", "os":"ubuntu-latest", "can-test":true},
88- {"target":"linux-x64-musl", "os":"ubuntu-latest", "can-test":false},
89- {"target":"windows-x64", "os":"windows-latest","can-test":true},
90- {"target":"darwin-x64", "os":"macos-latest", "can-test":false},
91- {"target":"linux-arm64", "os":"ubuntu-latest", "can-test":false},
92- {"target":"linux-arm64-musl", "os":"ubuntu-latest", "can-test":false}
86+ {"target":"darwin-arm64", "os":"ubuntu-latest", "can-test":false},
87+ {"target":"linux-x64", "os":"ubuntu-latest", "can-test":true},
88+ {"target":"windows-x64", "os":"ubuntu-latest", "can-test":false},
89+ {"target":"darwin-x64", "os":"ubuntu-latest", "can-test":false},
90+ {"target":"linux-arm64", "os":"ubuntu-latest", "can-test":false}
9391 ]}'
9492 fi
9593 echo 'MATRIX_EOF'
@@ -246,9 +244,6 @@ jobs:
246244 matrix : ${{ fromJSON(needs.changes.outputs.build-targets) }}
247245 steps :
248246 - uses : actions/checkout@v6
249- - uses : oven-sh/setup-bun@v2
250- with :
251- bun-version : " 1.3.13"
252247 - uses : pnpm/action-setup@v4
253248 - uses : actions/setup-node@v6
254249 with :
@@ -262,6 +257,28 @@ jobs:
262257 if : steps.cache.outputs.cache-hit != 'true'
263258 shell : bash
264259 run : pnpm install --frozen-lockfile
260+ - name : Setup codesign dependencies
261+ env :
262+ APPLE_CERT_DATA : ${{ secrets.CSC_LINK }}
263+ APPLE_API_KEY : ${{ secrets.APPLE_API_KEY }}
264+ run : |
265+ curl -L 'https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign%2F0.29.0/apple-codesign-0.29.0-x86_64-unknown-linux-musl.tar.gz' -o 'rcodesign.tar.gz'
266+ echo 'dbe85cedd8ee4217b64e9a0e4c2aef92ab8bcaaa41f20bde99781ff02e600002 rcodesign.tar.gz' | sha256sum -c
267+ tar -xzf rcodesign.tar.gz --strip-components=1
268+ mv rcodesign /usr/local/bin/rcodesign
269+ rm rcodesign.tar.gz
270+ if [ -n "$APPLE_CERT_DATA" ]; then
271+ echo "$APPLE_CERT_DATA" | base64 --decode > /tmp/certs.p12
272+ echo 'APPLE_CERT_PATH=/tmp/certs.p12' >> $GITHUB_ENV
273+ fi
274+ if [ -n "$APPLE_API_KEY" ]; then
275+ echo "$APPLE_API_KEY" | base64 -d > /tmp/apple_key.json
276+ cat /tmp/apple_key.json | jq .private_key -r > /tmp/apple_key.pem
277+ echo "APPLE_API_KEY_ISSUER_ID=$(cat /tmp/apple_key.json | jq .issuer_id -r | tr -d '\n\r')" >> $GITHUB_ENV
278+ echo "APPLE_API_KEY_ID=$(cat /tmp/apple_key.json | jq .key_id -r | tr -d '\n\r')" >> $GITHUB_ENV
279+ echo "APPLE_API_KEY_P8_PATH=/tmp/apple_key.pem" >> $GITHUB_ENV
280+ echo 'APPLE_API_KEY_PATH=/tmp/apple_key.json' >> $GITHUB_ENV
281+ fi
265282 - name : Set nightly version
266283 # Inject the nightly version (computed once in the changes job) into
267284 # package.json before the build so it gets baked into the binary.
@@ -278,7 +295,11 @@ jobs:
278295 SENTRY_AUTH_TOKEN : ${{ secrets.SENTRY_AUTH_TOKEN }}
279296 # Set on main/release branches so build.ts runs binpunch + creates .gz
280297 RELEASE_BUILD : ${{ github.event_name != 'pull_request' && '1' || '' }}
281- run : bun run build --target ${{ matrix.target }}
298+ # Codesigning: only on main/release pushes (fork PRs lack secrets)
299+ FOSSILIZE_SIGN : ${{ github.event_name == 'push' && (github.ref_name == 'main' || startsWith(github.ref_name, 'release/')) && 'y' || 'n' }}
300+ APPLE_CERT_PASSWORD : ${{ secrets.CSC_KEY_PASSWORD }}
301+ APPLE_TEAM_ID : ${{ vars.APPLE_TEAM_ID }}
302+ run : pnpm run build -- --target ${{ matrix.target }}
282303 - name : Smoke test
283304 if : matrix.can-test
284305 shell : bash
@@ -288,11 +309,6 @@ jobs:
288309 else
289310 ./dist-bin/sentry-${{ matrix.target }} --help
290311 fi
291- - name : Smoke test (musl/Alpine)
292- if : matrix.target == 'linux-x64-musl'
293- run : |
294- docker run --rm -v "$PWD/dist-bin:/dist-bin:ro" alpine:latest \
295- sh -c "apk add --no-cache libstdc++ libgcc >/dev/null 2>&1 && /dist-bin/sentry-linux-x64-musl --help"
296312 - name : Upload binary artifact
297313 uses : actions/upload-artifact@v7
298314 with :
0 commit comments