[MM-42538] Submit nightly builds to TestFlight for macOS (#2023)
* Initial MAS build, working on TestFlight * Migration of old configs to MAS * Ignore fastlane files * Add mac app store build to nightly build * Revert Me - For testing in PR * Don't need to install fastlane * BIG D * Fix patch updater script to allow for no yml * Nevermind, do this instead * Update xcode * Let's try a fake version that works * Revert version and rename for test flight * Use Xcode 13.0.0 * Use CircleCI build number when available * Revert testing changes * Remove notarize for MAS * Change vars to MACOS instead of IOS * Revert electron-builder to v22 * Revert package-lock.json Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
This commit is contained in:
35
fastlane/Fastfile
Normal file
35
fastlane/Fastfile
Normal file
@@ -0,0 +1,35 @@
|
||||
fastlane_version '2.71.0'
|
||||
fastlane_require 'aws-sdk-s3'
|
||||
fastlane_require 'erb'
|
||||
fastlane_require 'json'
|
||||
fastlane_require 'pathname'
|
||||
|
||||
lane :publish_test do |options|
|
||||
api_key = ''
|
||||
unless ENV['MACOS_API_KEY_ID'].nil? || ENV['MACOS_API_KEY_ID'].empty? ||
|
||||
ENV['MACOS_API_ISSUER_ID'].nil? || ENV['MACOS_API_ISSUER_ID'].empty? ||
|
||||
ENV['MACOS_API_KEY'].nil? || ENV['MACOS_API_KEY'].empty?
|
||||
api_key_path = "#{ENV['MACOS_API_KEY_ID']}.p8"
|
||||
File.open("../#{api_key_path}", 'w') do |f|
|
||||
key_string = ENV['MACOS_API_KEY']
|
||||
p8_array = key_string.split('\n')
|
||||
p8_array.each_with_index do |value, index|
|
||||
f.write(value)
|
||||
f.write("\n") unless index == p8_array.length - 1
|
||||
end
|
||||
end
|
||||
|
||||
api_key = app_store_connect_api_key(
|
||||
key_id: ENV['MACOS_API_KEY_ID'],
|
||||
issuer_id: ENV['MACOS_API_ISSUER_ID'],
|
||||
key_filepath: "./#{api_key_path}",
|
||||
in_house: ENV['MACOS_IN_HOUSE'] == 'true', # optional but may be required if using match/sigh
|
||||
)
|
||||
|
||||
File.delete("../#{api_key_path}")
|
||||
end
|
||||
pilot(
|
||||
pkg: options[:path],
|
||||
api_key: api_key
|
||||
)
|
||||
end
|
Reference in New Issue
Block a user