Skip to content

Commit

Permalink
Upload dev build dmgs on buildkite
Browse files Browse the repository at this point in the history
  • Loading branch information
p-jackson committed Apr 16, 2024
1 parent 8261b9b commit 2c114f4
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ steps:
node ./scripts/prepare-dev-build-version.mjs
npm run make:macos-x64
npm run make:macos-arm64
npm run make:dmg-x64
npm run make:dmg-arm64
.buildkite/commands/post-process-binary-for-distribution.sh
Expand Down
24 changes: 23 additions & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,16 @@ lane :distribute_dev_build do |_options|

binary_path_x64 = File.join(PROJECT_ROOT_FOLDER, 'out', 'Studio-darwin-x64', 'Studio.app.zip')
binary_path_arm64 = File.join(PROJECT_ROOT_FOLDER, 'out', 'Studio-darwin-arm64', 'Studio.app.zip')
dmg_path_x64 = File.join(PROJECT_ROOT_FOLDER, 'out', 'Studio-darwin-x64.dmg')
dmg_path_arm64 = File.join(PROJECT_ROOT_FOLDER, 'out', 'Studio-darwin-arm64.dmg')
manifest_path = File.join(PROJECT_ROOT_FOLDER, 'out', 'releases.json')
build_number = get_required_env('BUILDKITE_BUILD_NUMBER')

filename_root = 'studio-darwin'
hashed_filename_x64 = "#{filename_root}-x64-#{commit_hash}.app.zip"
hashed_filename_arm64 = "#{filename_root}-arm64-#{commit_hash}.app.zip"
hashed_dmg_filename_x64 = "#{filename_root}-x64-#{commit_hash}.dmg"
hashed_dmg_filename_arm64 = "#{filename_root}-arm64-#{commit_hash}.dmg"
latest_filename_x64 = "#{filename_root}-x64-latest.app.zip"
latest_filename_arm64 = "#{filename_root}-arm64-latest.app.zip"

Expand All @@ -92,6 +96,22 @@ lane :distribute_dev_build do |_options|
auto_prefix: false
)

upload_to_s3(
bucket: 'a8c-apps-public-artifacts',
key: "#{bucket_folder}/#{hashed_dmg_filename_x64}",
file: dmg_path_x64,
if_exists: :fail,
auto_prefix: false
)

upload_to_s3(
bucket: 'a8c-apps-public-artifacts',
key: "#{bucket_folder}/#{hashed_dmg_filename_arm64}",
file: dmg_path_arm64,
if_exists: :fail,
auto_prefix: false
)

upload_to_s3(
bucket: 'a8c-apps-public-artifacts',
key: "#{bucket_folder}/#{latest_filename_x64}",
Expand Down Expand Up @@ -133,11 +153,13 @@ lane :distribute_dev_build do |_options|

download_url_x64 = "https://cdn.a8c-ci.services/#{bucket_folder}/#{hashed_filename_x64}"
download_url_arm64 = "https://cdn.a8c-ci.services/#{bucket_folder}/#{hashed_filename_arm64}"
download_dmg_url_x64 = "https://cdn.a8c-ci.services/#{bucket_folder}/#{hashed_dmg_filename_x64}"
download_dmg_url_arm64 = "https://cdn.a8c-ci.services/#{bucket_folder}/#{hashed_dmg_filename_arm64}"

buildkite_annotate(
context: 'cdn-link',
style: 'info',
message: "🔗 Build availble for download for [Intel](#{download_url_x64}) and [Apple Silicon](#{download_url_arm64})"
message: "🔗 Build availble for download for Intel ([zip](#{download_url_x64}), [dmg](#{download_dmg_url_x64})) and Apple Silicon ([zip](#{download_url_arm64}), [dmg](#{download_dmg_url_arm64}))"
)
end

Expand Down

0 comments on commit 2c114f4

Please sign in to comment.