Skip to content

Commit

Permalink
fix:.修复Need to acknowledge to Apple's Apple ID and Privacy statement问题,
Browse files Browse the repository at this point in the history
  • Loading branch information
lyf571321556 committed Feb 25, 2021
1 parent 33ee82b commit 237a7ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,9 @@ jobs:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
PGY_API_KEY: ${{ secrets.PGY_API_KEY }}
PGY_USER_KEY: ${{ secrets.PGY_USER_KEY }}
APPLE_AUTH_KEY: ${{ secrets.APPLE_AUTH_KEY }}
APPLE_AUTH_JSON_KEY: ${{ secrets.APPLE_AUTH_JSON_KEY }}
APPLE_AUTH_P8_KEY: ${{ secrets.APPLE_AUTH_P8_KEY }}
APPLE_AUTH_P8_BASE64_KEY: ${{ secrets.APPLE_AUTH_P8_BASE64_KEY }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
BUILD_REVISION: ${{ steps.CURRENT_TAG_OR_TAG.outputs.BUILD_REVISION }}
run: sh ./ios/build.sh
Expand Down
9 changes: 6 additions & 3 deletions ios/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ $env_key_fabric_api_token = 'FABRIC_API_TOKEN'
$env_key_fabric_build_secret = 'FABRIC_BUILD_SECRET'
$env_key_fastlane_match_basic_auth = 'MATCH_GIT_BASIC_AUTHORIZATION'
# fastlane打包上传ipa到app-store-connect需要使用最新授权方式(https://docs.fastlane.tools/app-store-connect-api/)
$env_key_fastlane_apple_auth_key = 'APPLE_AUTH_KEY'
$env_key_fastlane_apple_auth_json_key = 'APPLE_AUTH_JSON_KEY'
$env_key_fastlane_apple_auth_p8_key = 'APPLE_AUTH_P8_KEY'
$env_key_fastlane_apple_auth_p8_base64_key = 'APPLE_AUTH_P8_BASE64_KEY'

$path_dir_build = ENV[$env_key_mobile_root]
$current_branch = ENV[$env_current_branch]
Expand Down Expand Up @@ -153,7 +154,7 @@ platform :ios do
# )
if should_pilot
File.open($path_file_apple_auth_json, "w") do |file|
file.write(JSON.pretty_generate("#{ENV[$env_key_fastlane_apple_auth_key]}").gsub('\n', '\\n'))
file.write(JSON.pretty_generate("#{ENV[$env_key_fastlane_apple_auth_json_key]}").gsub('\n', '\\n'))
end
Dir.chdir($path_dir_ios) do
sh('ls -lh')
Expand All @@ -166,10 +167,12 @@ platform :ios do
sh('ls -lh')
sh('cat',$path_file_apple_auth_p8)
end
# key_filepath: $path_file_apple_auth_p8,
api_key = app_store_connect_api_key(
key_id: "YU2873TJJ5",
issuer_id: "69a6de89-d0ae-47e3-e053-5b8c7c11a4d1",
key_filepath: $path_file_apple_auth_p8,
key_content: "#{ENV[$env_key_fastlane_apple_auth_p8_base64_key]}",
is_key_content_base64: true,
duration: 1200,
in_house: false
)
Expand Down

0 comments on commit 237a7ce

Please sign in to comment.