mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Added fastlane release scripts.
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
lane :build_and_publish_on_github do
|
||||
ios_adhoc()
|
||||
|
||||
upload_to_diawi()
|
||||
|
||||
mac_adhoc()
|
||||
|
||||
release_to_github()
|
||||
|
||||
end
|
||||
|
||||
lane :ios_adhoc do
|
||||
build_ios_app(
|
||||
scheme: "ElementX",
|
||||
export_method: "ad-hoc",
|
||||
output_directory: "build",
|
||||
export_options: {
|
||||
provisioningProfiles: {
|
||||
"io.element.elementx" => "ElementX Ad Hoc",
|
||||
}
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
lane :mac_adhoc do
|
||||
build_mac_app(
|
||||
scheme: "ElementX",
|
||||
export_method: "mac-application",
|
||||
output_directory: "build"
|
||||
)
|
||||
|
||||
zip(
|
||||
path: "build/ElementX.app",
|
||||
output_path: "build/ElementX.app.zip"
|
||||
)
|
||||
end
|
||||
|
||||
desc "Upload IPA to Diawi"
|
||||
private_lane :upload_to_diawi do
|
||||
api_token = "" #ENV["DIAWI_API_TOKEN"]
|
||||
UI.user_error!("Invalid Diawi API token.") unless !api_token.to_s.empty?
|
||||
|
||||
# Upload to Diawi
|
||||
diawi(
|
||||
token: api_token,
|
||||
wall_of_apps: false,
|
||||
file: lane_context[SharedValues::IPA_OUTPUT_PATH]
|
||||
)
|
||||
|
||||
# Get the Diawi link from Diawi action shared value
|
||||
diawi_link = lane_context[SharedValues::UPLOADED_FILE_LINK_TO_DIAWI]
|
||||
UI.command_output("Diawi link: " + diawi_link.to_s)
|
||||
end
|
||||
|
||||
desc "Create GitHub Release"
|
||||
private_lane :release_to_github do
|
||||
api_token = "" #ENV["GITHUB_TOKEN"]
|
||||
UI.user_error!("Invalid GitHub API token.") unless !api_token.to_s.empty?
|
||||
|
||||
# Get the Diawi link from Diawi action shared value
|
||||
diawi_link = lane_context[SharedValues::UPLOADED_FILE_LINK_TO_DIAWI]
|
||||
|
||||
# Generate the Diawi QR code file link
|
||||
diawi_app_id = URI(diawi_link).path.split('/').last
|
||||
diawi_qr_code_link = "https://www.diawi.com/qrcode/link/#{diawi_app_id}"
|
||||
|
||||
release_version = "v#{get_version_number()}.#{Time.now.strftime("%Y%m%d%H%M")}"
|
||||
|
||||
github_release = set_github_release(
|
||||
repository_name: "vector-im/element-x-ios",
|
||||
api_token: api_token,
|
||||
name: release_version,
|
||||
tag_name: release_version,
|
||||
is_generate_release_notes: true,
|
||||
description: "[iOS AdHoc Release - Diawi Link](#{diawi_link})
|
||||
",
|
||||
upload_assets: ["build/ElementX.app.zip"]
|
||||
)
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
# Autogenerated by fastlane
|
||||
#
|
||||
# Ensure this file is checked in to source control!
|
||||
|
||||
gem 'fastlane-plugin-diawi'
|
||||
@@ -0,0 +1,46 @@
|
||||
fastlane documentation
|
||||
----
|
||||
|
||||
# Installation
|
||||
|
||||
Make sure you have the latest version of the Xcode command line tools installed:
|
||||
|
||||
```sh
|
||||
xcode-select --install
|
||||
```
|
||||
|
||||
For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)
|
||||
|
||||
# Available Actions
|
||||
|
||||
### build_and_publish_on_github
|
||||
|
||||
```sh
|
||||
[bundle exec] fastlane build_and_publish_on_github
|
||||
```
|
||||
|
||||
|
||||
|
||||
### ios_adhoc
|
||||
|
||||
```sh
|
||||
[bundle exec] fastlane ios_adhoc
|
||||
```
|
||||
|
||||
|
||||
|
||||
### mac_adhoc
|
||||
|
||||
```sh
|
||||
[bundle exec] fastlane mac_adhoc
|
||||
```
|
||||
|
||||
|
||||
|
||||
----
|
||||
|
||||
This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.
|
||||
|
||||
More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).
|
||||
|
||||
The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).
|
||||
Reference in New Issue
Block a user