Create GitHub draft release using Fastlane
[ci skip]
This commit is contained in:
parent
dc055b4b6e
commit
900fdb1b7f
@ -9,7 +9,7 @@ GEM
|
|||||||
artifactory (3.0.15)
|
artifactory (3.0.15)
|
||||||
atomos (0.1.3)
|
atomos (0.1.3)
|
||||||
aws-eventstream (1.1.0)
|
aws-eventstream (1.1.0)
|
||||||
aws-partitions (1.426.0)
|
aws-partitions (1.428.0)
|
||||||
aws-sdk-core (3.112.0)
|
aws-sdk-core (3.112.0)
|
||||||
aws-eventstream (~> 1, >= 1.0.2)
|
aws-eventstream (~> 1, >= 1.0.2)
|
||||||
aws-partitions (~> 1, >= 1.239.0)
|
aws-partitions (~> 1, >= 1.239.0)
|
||||||
@ -18,7 +18,7 @@ GEM
|
|||||||
aws-sdk-kms (1.42.0)
|
aws-sdk-kms (1.42.0)
|
||||||
aws-sdk-core (~> 3, >= 3.112.0)
|
aws-sdk-core (~> 3, >= 3.112.0)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sigv4 (~> 1.1)
|
||||||
aws-sdk-s3 (1.88.0)
|
aws-sdk-s3 (1.88.1)
|
||||||
aws-sdk-core (~> 3, >= 3.112.0)
|
aws-sdk-core (~> 3, >= 3.112.0)
|
||||||
aws-sdk-kms (~> 1)
|
aws-sdk-kms (~> 1)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sigv4 (~> 1.1)
|
||||||
@ -39,7 +39,7 @@ GEM
|
|||||||
unf (>= 0.0.5, < 1.0.0)
|
unf (>= 0.0.5, < 1.0.0)
|
||||||
dotenv (2.7.6)
|
dotenv (2.7.6)
|
||||||
ed25519 (1.2.4)
|
ed25519 (1.2.4)
|
||||||
emoji_regex (3.2.1)
|
emoji_regex (3.2.2)
|
||||||
excon (0.79.0)
|
excon (0.79.0)
|
||||||
faraday (1.3.0)
|
faraday (1.3.0)
|
||||||
faraday-net_http (~> 1.0)
|
faraday-net_http (~> 1.0)
|
||||||
@ -52,7 +52,7 @@ GEM
|
|||||||
faraday_middleware (1.0.0)
|
faraday_middleware (1.0.0)
|
||||||
faraday (~> 1.0)
|
faraday (~> 1.0)
|
||||||
fastimage (2.2.2)
|
fastimage (2.2.2)
|
||||||
fastlane (2.174.0)
|
fastlane (2.175.0)
|
||||||
CFPropertyList (>= 2.3, < 4.0.0)
|
CFPropertyList (>= 2.3, < 4.0.0)
|
||||||
addressable (>= 2.3, < 3.0.0)
|
addressable (>= 2.3, < 3.0.0)
|
||||||
artifactory (~> 3.0)
|
artifactory (~> 3.0)
|
||||||
@ -76,6 +76,7 @@ GEM
|
|||||||
jwt (>= 2.1.0, < 3)
|
jwt (>= 2.1.0, < 3)
|
||||||
mini_magick (>= 4.9.4, < 5.0.0)
|
mini_magick (>= 4.9.4, < 5.0.0)
|
||||||
multipart-post (~> 2.0.0)
|
multipart-post (~> 2.0.0)
|
||||||
|
naturally (~> 2.2)
|
||||||
plist (>= 3.1.0, < 4.0.0)
|
plist (>= 3.1.0, < 4.0.0)
|
||||||
rubyzip (>= 2.0.0, < 3.0.0)
|
rubyzip (>= 2.0.0, < 3.0.0)
|
||||||
security (= 0.1.3)
|
security (= 0.1.3)
|
||||||
|
@ -19,3 +19,5 @@ S3_ACCESS_KEY=
|
|||||||
S3_SECRET_ACCESS_KEY=
|
S3_SECRET_ACCESS_KEY=
|
||||||
|
|
||||||
SLACK_URL=
|
SLACK_URL=
|
||||||
|
|
||||||
|
GITHUB_TOKEN=
|
||||||
|
@ -13,6 +13,8 @@ version = get_version_name(
|
|||||||
ext_constant_name:"androidVersionName")
|
ext_constant_name:"androidVersionName")
|
||||||
version = version.delete "'"
|
version = version.delete "'"
|
||||||
|
|
||||||
|
release_note_path_en = "metadata/android/en-US/changelogs/default.txt"
|
||||||
|
|
||||||
platform :android do |options|
|
platform :android do |options|
|
||||||
|
|
||||||
desc "Run all the tests"
|
desc "Run all the tests"
|
||||||
@ -22,14 +24,13 @@ platform :android do |options|
|
|||||||
|
|
||||||
desc "Deploy new version to Google Play and APK Store options: beta:false (default)"
|
desc "Deploy new version to Google Play and APK Store options: beta:false (default)"
|
||||||
lane :deploy do |options|
|
lane :deploy do |options|
|
||||||
release_note_path_en = "metadata/android/en-US/changelogs/default.txt"
|
|
||||||
|
|
||||||
# use english-change-log for french language too
|
# use english-change-log for french language too
|
||||||
FileUtils.cp(release_note_path_en, "metadata/android/fr-FR/changelogs/default.txt")
|
FileUtils.cp(release_note_path_en, "metadata/android/fr-FR/changelogs/default.txt")
|
||||||
|
|
||||||
deployToPlaystore(beta:options[:beta])
|
deployToPlaystore(beta:options[:beta])
|
||||||
deployToServer(beta:options[:beta])
|
deployToServer(beta:options[:beta])
|
||||||
deployToFDroid(beta:options[:beta])
|
deployToFDroid(beta:options[:beta])
|
||||||
|
createGitHubDraftRelease(beta:options[:beta])
|
||||||
|
|
||||||
slack(
|
slack(
|
||||||
default_payloads: [], # reduce the notification to the minimum
|
default_payloads: [], # reduce the notification to the minimum
|
||||||
@ -180,4 +181,34 @@ platform :android do |options|
|
|||||||
|
|
||||||
FileUtils.cp(lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH], "release/Cryptomator-#{version}_fdroid_signed.apk")
|
FileUtils.cp(lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH], "release/Cryptomator-#{version}_fdroid_signed.apk")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc "Create GitHub draft release"
|
||||||
|
lane :createGitHubDraftRelease do |options|
|
||||||
|
target_branch = "main"
|
||||||
|
prerelease = false
|
||||||
|
|
||||||
|
if options[:beta]
|
||||||
|
target_branch = "release/#{version}"
|
||||||
|
prerelease = true
|
||||||
|
end
|
||||||
|
|
||||||
|
website_apk_sha256 = Digest::SHA256.hexdigest File.read "release/Cryptomator-#{version}_signed.apk"
|
||||||
|
fdroid_apk_sha256 = Digest::SHA256.hexdigest File.read "release/Cryptomator-#{version}_fdroid_signed.apk"
|
||||||
|
|
||||||
|
release_note = "## What's New\n\n" + File.read(release_note_path_en) + "\n\n---\n\nSHA256 Signature: `#{website_apk_sha256}`\nSHA256 Signature fdroid: `#{fdroid_apk_sha256}`\n"
|
||||||
|
|
||||||
|
puts release_note
|
||||||
|
|
||||||
|
github_release = set_github_release(
|
||||||
|
repository_name: "cryptomator/android",
|
||||||
|
api_token: ENV["GITHUB_PERSONAL_ACCESS_TOKEN"],
|
||||||
|
name: "#{version}",
|
||||||
|
tag_name: "#{version}",
|
||||||
|
description: release_note,
|
||||||
|
commitish: target_branch,
|
||||||
|
is_draft: true,
|
||||||
|
is_prerelease: prerelease,
|
||||||
|
upload_assets: ["fastlane/release/Cryptomator-#{version}_fdroid_signed.apk", "fastlane/release/Cryptomator-#{version}_signed.apk"]
|
||||||
|
)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -41,6 +41,11 @@ Deploy new version to server
|
|||||||
fastlane android deployToFDroid
|
fastlane android deployToFDroid
|
||||||
```
|
```
|
||||||
Deploy new version to F-Droid
|
Deploy new version to F-Droid
|
||||||
|
### android createGitHubDraftRelease
|
||||||
|
```
|
||||||
|
fastlane android createGitHubDraftRelease
|
||||||
|
```
|
||||||
|
Create GitHub draft release
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user