mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Update workflow
This commit is contained in:
14
.github/workflows/build.yml
vendored
14
.github/workflows/build.yml
vendored
@@ -1,9 +1,19 @@
|
|||||||
on: push
|
name: build
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- candidate
|
||||||
|
- release
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: -- Step 0 -- Extract branch name
|
||||||
|
shell: bash
|
||||||
|
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
||||||
|
id: branch
|
||||||
- name: -- Step 1 -- Checkout code
|
- name: -- Step 1 -- Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
@@ -24,7 +34,7 @@ jobs:
|
|||||||
run: bundle install
|
run: bundle install
|
||||||
- name: -- Step 6 -- Run fastlane
|
- name: -- Step 6 -- Run fastlane
|
||||||
env:
|
env:
|
||||||
ENVIRONMENT: ${{ secrets.ENVIRONMENT }}
|
ENVIRONMENT: ${{ steps.branch.outputs.branch }}
|
||||||
LC_ALL: en_US.UTF-8
|
LC_ALL: en_US.UTF-8
|
||||||
LANG: en_US.UTF-8
|
LANG: en_US.UTF-8
|
||||||
SENTRY_ORGANIZATION: ${{ secrets.SENTRY_ORGANIZATION }}
|
SENTRY_ORGANIZATION: ${{ secrets.SENTRY_ORGANIZATION }}
|
||||||
|
@@ -12,7 +12,7 @@ RELEASE_CHANNEL = "#{VERSIONS[:major]}-#{VERSIONS[:minor]}-#{ENVIRONMENT}"
|
|||||||
BUILD_NUMBER = ENV["GITHUB_RUN_NUMBER"]
|
BUILD_NUMBER = ENV["GITHUB_RUN_NUMBER"]
|
||||||
GITHUB_REPO = "tooot-app/app"
|
GITHUB_REPO = "tooot-app/app"
|
||||||
case ENVIRONMENT
|
case ENVIRONMENT
|
||||||
when "development"
|
when "main"
|
||||||
GITHUB_RELEASE= ""
|
GITHUB_RELEASE= ""
|
||||||
when "candidate"
|
when "candidate"
|
||||||
GITHUB_RELEASE = "v#{VERSION}-#{VERSIONS[:patch]}"
|
GITHUB_RELEASE = "v#{VERSION}-#{VERSIONS[:patch]}"
|
||||||
@@ -80,12 +80,6 @@ private_lane :build_ios do
|
|||||||
setup_ci
|
setup_ci
|
||||||
|
|
||||||
case ENVIRONMENT
|
case ENVIRONMENT
|
||||||
when "development"
|
|
||||||
match( type: "development", readonly: true )
|
|
||||||
if !is_ci
|
|
||||||
build_ios_app( export_method: "development", output_directory: BUILD_DIRECTORY )
|
|
||||||
install_on_device( skip_wifi: true )
|
|
||||||
end
|
|
||||||
when "candidate"
|
when "candidate"
|
||||||
install_pods_ios
|
install_pods_ios
|
||||||
prepare_appstore_ios
|
prepare_appstore_ios
|
||||||
@@ -102,6 +96,12 @@ private_lane :build_ios do
|
|||||||
prepare_appstore_ios
|
prepare_appstore_ios
|
||||||
match( type: "appstore", readonly: true, include_bitcode: true )
|
match( type: "appstore", readonly: true, include_bitcode: true )
|
||||||
build_ios_app( export_method: "app-store" )
|
build_ios_app( export_method: "app-store" )
|
||||||
|
else
|
||||||
|
if !is_ci
|
||||||
|
match( type: "development", readonly: true )
|
||||||
|
build_ios_app( export_method: "development", output_directory: BUILD_DIRECTORY )
|
||||||
|
install_on_device( skip_wifi: true )
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -110,17 +110,6 @@ private_lane :build_android do
|
|||||||
sh("echo #{ENV["ANDROID_KEYSTORE"]} | base64 -d | tee #{File.expand_path('..', Dir.pwd)}/android/tooot.jks >/dev/null", log: false)
|
sh("echo #{ENV["ANDROID_KEYSTORE"]} | base64 -d | tee #{File.expand_path('..', Dir.pwd)}/android/tooot.jks >/dev/null", log: false)
|
||||||
|
|
||||||
case ENVIRONMENT
|
case ENVIRONMENT
|
||||||
when "development"
|
|
||||||
if !is_ci
|
|
||||||
build_android_app(
|
|
||||||
task: 'assemble',
|
|
||||||
build_type: 'release',
|
|
||||||
project_dir: "./android"
|
|
||||||
)
|
|
||||||
adb(
|
|
||||||
command: "install #{lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH]}"
|
|
||||||
)
|
|
||||||
end
|
|
||||||
when "candidate"
|
when "candidate"
|
||||||
prepare_playstore_android
|
prepare_playstore_android
|
||||||
build_android_app(
|
build_android_app(
|
||||||
@@ -146,6 +135,17 @@ private_lane :build_android do
|
|||||||
skip_upload_screenshots: true
|
skip_upload_screenshots: true
|
||||||
)
|
)
|
||||||
when "release"
|
when "release"
|
||||||
|
else
|
||||||
|
if !is_ci
|
||||||
|
build_android_app(
|
||||||
|
task: 'assemble',
|
||||||
|
build_type: 'release',
|
||||||
|
project_dir: "./android"
|
||||||
|
)
|
||||||
|
adb(
|
||||||
|
command: "install #{lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH]}"
|
||||||
|
)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user