@@ -75,21 +75,18 @@ 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
8483 # main, release/**, workflow_call: full cross-platform matrix
8584 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}
85+ {"target":"darwin-arm64", "os":"macos-latest", "can-test":true},
86+ {"target":"linux-x64", "os":"ubuntu-latest", "can-test":true},
87+ {"target":"windows-x64", "os":"windows-latest","can-test":true},
88+ {"target":"darwin-x64", "os":"macos-latest", "can-test":false},
89+ {"target":"linux-arm64", "os":"ubuntu-latest", "can-test":false}
9390 ]}'
9491 fi
9592 echo 'MATRIX_EOF'
@@ -246,9 +243,6 @@ jobs:
246243 matrix : ${{ fromJSON(needs.changes.outputs.build-targets) }}
247244 steps :
248245 - uses : actions/checkout@v6
249- - uses : oven-sh/setup-bun@v2
250- with :
251- bun-version : " 1.3.13"
252246 - uses : pnpm/action-setup@v4
253247 - uses : actions/setup-node@v6
254248 with :
@@ -262,6 +256,28 @@ jobs:
262256 if : steps.cache.outputs.cache-hit != 'true'
263257 shell : bash
264258 run : pnpm install --frozen-lockfile
259+ - name : Setup codesign dependencies
260+ env :
261+ APPLE_CERT_DATA : ${{ secrets.CSC_LINK }}
262+ APPLE_API_KEY : ${{ secrets.APPLE_API_KEY }}
263+ run : |
264+ 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'
265+ echo 'dbe85cedd8ee4217b64e9a0e4c2aef92ab8bcaaa41f20bde99781ff02e600002 rcodesign.tar.gz' | sha256sum -c
266+ tar -xzf rcodesign.tar.gz --strip-components=1
267+ mv rcodesign /usr/local/bin/rcodesign
268+ rm rcodesign.tar.gz
269+ if [ -n "$APPLE_CERT_DATA" ]; then
270+ echo "$APPLE_CERT_DATA" | base64 --decode > /tmp/certs.p12
271+ echo 'APPLE_CERT_PATH=/tmp/certs.p12' >> $GITHUB_ENV
272+ fi
273+ if [ -n "$APPLE_API_KEY" ]; then
274+ echo "$APPLE_API_KEY" | base64 -d > /tmp/apple_key.json
275+ cat /tmp/apple_key.json | jq .private_key -r > /tmp/apple_key.pem
276+ echo "APPLE_API_KEY_ISSUER_ID=$(cat /tmp/apple_key.json | jq .issuer_id -r | tr -d '\n\r')" >> $GITHUB_ENV
277+ echo "APPLE_API_KEY_ID=$(cat /tmp/apple_key.json | jq .key_id -r | tr -d '\n\r')" >> $GITHUB_ENV
278+ echo "APPLE_API_KEY_P8_PATH=/tmp/apple_key.pem" >> $GITHUB_ENV
279+ echo 'APPLE_API_KEY_PATH=/tmp/apple_key.json' >> $GITHUB_ENV
280+ fi
265281 - name : Set nightly version
266282 # Inject the nightly version (computed once in the changes job) into
267283 # package.json before the build so it gets baked into the binary.
@@ -278,7 +294,11 @@ jobs:
278294 SENTRY_AUTH_TOKEN : ${{ secrets.SENTRY_AUTH_TOKEN }}
279295 # Set on main/release branches so build.ts runs binpunch + creates .gz
280296 RELEASE_BUILD : ${{ github.event_name != 'pull_request' && '1' || '' }}
281- run : bun run build --target ${{ matrix.target }}
297+ # Codesigning: only on main/release pushes (fork PRs lack secrets)
298+ FOSSILIZE_SIGN : ${{ github.event_name == 'push' && (github.ref_name == 'main' || startsWith(github.ref_name, 'release/')) && 'y' || 'n' }}
299+ APPLE_CERT_PASSWORD : ${{ secrets.CSC_KEY_PASSWORD }}
300+ APPLE_TEAM_ID : ${{ vars.APPLE_TEAM_ID }}
301+ run : pnpm run build -- --target ${{ matrix.target }}
282302 - name : Smoke test
283303 if : matrix.can-test
284304 shell : bash
@@ -288,11 +308,6 @@ jobs:
288308 else
289309 ./dist-bin/sentry-${{ matrix.target }} --help
290310 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"
296311 - name : Upload binary artifact
297312 uses : actions/upload-artifact@v7
298313 with :
0 commit comments