1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 18:47:27 +08:00

Add proper signing and github release support

This commit is contained in:
Dean Herbert 2019-09-24 16:21:37 +09:00
parent e97aa60487
commit 60c9519095
2 changed files with 48 additions and 5 deletions

View File

@ -4,14 +4,12 @@ platform :android do
desc 'Deploy to play store'
lane :beta do |options|
# update csproj version
update_version(
solution_path: 'osu.Android.sln',
version: options[:version],
build: options[:build],
)
build()
build(options)
supply(
apk: './osu.Android/bin/Release/sh.ppy.osulazer-Signed.apk',
@ -21,8 +19,35 @@ desc 'Deploy to play store'
)
end
desc 'Deploy to github release'
lane :build_github do |options|
update_version(
version: options[:version],
build: options[:build],
)
build(options)
client = HTTPClient.new
changelog = client.get_content 'https://gist.githubusercontent.com/peppy/aaa2ec1a323554b619671cac6dbbb776/raw'
changelog.gsub!('$BUILD_ID', options[:build])
set_github_release(
repository_name: "ppy/osu",
api_token: ENV["GITHUB_TOKEN"],
name: options[:build],
tag_name: options[:build],
is_draft: true,
description: changelog,
commitish: "master",
upload_assets: ["osu.Android/bin/Release/sh.ppy.osulazer.apk"]
)
end
desc 'Compile the project'
lane :build do
lane :build do |options|
nuget_restore(
project_path: 'osu.Android.sln'
)
@ -31,11 +56,24 @@ desc 'Deploy to play store'
build_configuration: 'Release',
solution_path: 'osu.Android.sln',
platform: "android",
output_path: "osu.Android/bin/Release/",
keystore_path: options[:keystore_path],
keystore_alias: options[:keystore_alias],
keystore_password: ENV["KEYSTORE_PASSWORD"]
)
end
lane :update_version do |options|
app_version(options)
split = options[:build].split('.')
split[1] = split[1].to_s.rjust(4, '0')
android_build = split.join('')
app_version(
solution_path: 'osu.Android.sln',
version: options[:version],
build: android_build,
)
end
end

View File

@ -21,6 +21,11 @@ or alternatively using `brew cask install fastlane`
fastlane android beta
```
Deploy to play store
### android build_github
```
fastlane android build_github
```
Deploy to github release
### android build
```
fastlane android build