mirror of
https://git.sanhost.net/sanasol/hytale-f2p
synced 2026-02-27 08:41:49 -03:00
Compare commits
4 Commits
hotfix/mac
...
v2.2.2-tes
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
153868fb87 | ||
|
|
743d7f2b7c | ||
|
|
759a7089c4 | ||
|
|
0a5cc3f6d7 |
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -29,7 +29,7 @@ jobs:
|
||||
|
||||
# macOS ARM64 build (Apple Silicon)
|
||||
build-macos-arm64:
|
||||
runs-on: macos-14 # M1 runner for native ARM64 builds
|
||||
runs-on: macos-latest # ARM64 runner for native Apple Silicon builds
|
||||
timeout-minutes: 120
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -70,7 +70,7 @@ jobs:
|
||||
|
||||
# macOS x64 build (Intel)
|
||||
build-macos-x64:
|
||||
runs-on: macos-13 # Intel runner for native x64 builds
|
||||
runs-on: macos-15-large # Intel runner for native x64 builds
|
||||
timeout-minutes: 120
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -138,7 +138,11 @@
|
||||
"hardenedRuntime": true,
|
||||
"gatekeeperAssess": false,
|
||||
"entitlements": "build/entitlements.mac.plist",
|
||||
"entitlementsInherit": "build/entitlements.mac.plist"
|
||||
"entitlementsInherit": "build/entitlements.mac.plist",
|
||||
"forceCodeSigning": true,
|
||||
"strictVerify": true,
|
||||
"type": "distribution",
|
||||
"notarize": false
|
||||
},
|
||||
"afterSign": "scripts/notarize.js",
|
||||
"nsis": {
|
||||
|
||||
@@ -11,6 +11,18 @@ try {
|
||||
|
||||
const path = require('path');
|
||||
|
||||
// Timeout for notarization (30 minutes max)
|
||||
const NOTARIZE_TIMEOUT_MS = 30 * 60 * 1000;
|
||||
|
||||
function withTimeout(promise, ms, message) {
|
||||
return Promise.race([
|
||||
promise,
|
||||
new Promise((_, reject) =>
|
||||
setTimeout(() => reject(new Error(message)), ms)
|
||||
)
|
||||
]);
|
||||
}
|
||||
|
||||
exports.default = async function notarizing(context) {
|
||||
console.log('[Notarize] afterSign hook called');
|
||||
console.log('[Notarize] Context:', JSON.stringify({
|
||||
@@ -27,6 +39,12 @@ exports.default = async function notarizing(context) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if notarization is disabled via env var
|
||||
if (process.env.SKIP_NOTARIZE === 'true') {
|
||||
console.log('[Notarize] Skipping: SKIP_NOTARIZE=true');
|
||||
return;
|
||||
}
|
||||
|
||||
// Check credentials
|
||||
const hasAppleId = !!process.env.APPLE_ID;
|
||||
const hasPassword = !!process.env.APPLE_APP_SPECIFIC_PASSWORD;
|
||||
@@ -45,18 +63,30 @@ exports.default = async function notarizing(context) {
|
||||
console.log('[Notarize] Starting notarization...');
|
||||
console.log('[Notarize] App path:', appPath);
|
||||
console.log('[Notarize] Team ID:', process.env.APPLE_TEAM_ID);
|
||||
console.log('[Notarize] Timeout:', NOTARIZE_TIMEOUT_MS / 1000, 'seconds');
|
||||
|
||||
try {
|
||||
await notarize({
|
||||
appPath,
|
||||
appleId: process.env.APPLE_ID,
|
||||
appleIdPassword: process.env.APPLE_APP_SPECIFIC_PASSWORD,
|
||||
teamId: process.env.APPLE_TEAM_ID,
|
||||
});
|
||||
await withTimeout(
|
||||
notarize({
|
||||
appPath,
|
||||
appleId: process.env.APPLE_ID,
|
||||
appleIdPassword: process.env.APPLE_APP_SPECIFIC_PASSWORD,
|
||||
teamId: process.env.APPLE_TEAM_ID,
|
||||
}),
|
||||
NOTARIZE_TIMEOUT_MS,
|
||||
`Notarization timed out after ${NOTARIZE_TIMEOUT_MS / 1000} seconds`
|
||||
);
|
||||
console.log('[Notarize] Notarization complete!');
|
||||
} catch (error) {
|
||||
console.error('[Notarize] Notarization failed:', error.message);
|
||||
console.error('[Notarize] Full error:', error);
|
||||
|
||||
// Don't fail the build if notarization times out or fails
|
||||
// The app will still be code-signed, just not notarized
|
||||
if (process.env.NOTARIZE_FAIL_ON_ERROR !== 'true') {
|
||||
console.warn('[Notarize] Continuing build without notarization (set NOTARIZE_FAIL_ON_ERROR=true to fail)');
|
||||
return;
|
||||
}
|
||||
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user