diff --git a/Jenkinsfile-ios b/Jenkinsfile-ios index e540e4a7..8bdfc5e9 100644 --- a/Jenkinsfile-ios +++ b/Jenkinsfile-ios @@ -34,6 +34,8 @@ pipeline { API_ISSUER = "69a6de7f-3378-47e3-e053-5b8c7c11a4d1" // API 密钥对应的Issuer ID API_TYPE = "ios" // 应用类型(固定为ios) P8_FILE = "${CERT_DIR}/AuthKey_ACRB9XFL9G.p8" // .p8 密钥文件 + APP_NAME = "吉AI学" + API_ENDPOINT = "https://api.appstoreconnect.apple.com/v1" } stages { stage('打印环境变量') { @@ -212,10 +214,22 @@ pipeline { echo "✅ IPA 验证成功!开始上传到 TestFlight" - echo "🎉 全部完成!请到 App Store Connect TestFlight 查看构建" } } + stage('🔐 生成 JWT') { + steps { + script { + JWT_TOKEN = sh( + script: 'node scripts/generate-asc-jwt.js', + returnStdout: true + ).trim() + } + + echo "✅ JWT 生成成功${JWT_TOKEN}" + } + } + } post { diff --git a/package.json b/package.json index cdf57856..4b2b55fa 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,8 @@ "build:app-plus:sit": "uni build -p app-plus --mode sit", "build:app-plus:uat": "uni build -p app-plus --mode uat", "build:app-plus:prod": "uni build -p app-plus", - "build:h5:dev": "uni build -p h5 --mode development_h5", - "build:h5": "uni build", + "build:h5:dev": "uni build -p h5 --mode development_h5", + "build:h5": "uni build", "b": "uni build -p app-plus", "i": "npm install --registry=https://registry.npmmirror.com" }, @@ -38,6 +38,7 @@ "@dcloudio/uni-quickapp-webview": "3.0.0-4060620250520001", "crypto-js": "^3.1.9-1", "dompurify": "^3.3.0", + "jsonwebtoken": "^9.0.3", "markdown-it": "^14.1.0", "pinia": "^2.3.1", "terser": "^5.42.0", @@ -57,6 +58,7 @@ "json5": "^2.2.3", "sass": "1.77.0", "typescript": "^5.9.3", - "vite": "5.2.8" + "vite": "5.2.8", + "jsonwebtoken": "^9.0.2" } }