Skip to content

Commit

Permalink
[INJI-720] add a workflow to upload to actions without using secrets (m…
Browse files Browse the repository at this point in the history
…osip#1171)

Signed-off-by: adityankannan-tw <[email protected]>
Co-authored-by: adityankannan-tw <[email protected]>
  • Loading branch information
adityankannan-tw and Adityankannan authored Jan 16, 2024
1 parent ee7e096 commit d50a12c
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 6 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/android-custom-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Android Custom Build
run-name: ${{ inputs.buildName }}

on:
workflow_dispatch:
inputs:
buildName:
description: 'Run name'
required: true
default: 'Edit this name'
type: string
mimotoBackendServiceUrl:
description: 'Mimoto backend service URL'
required: true
default: 'https://api.sandbox.mosip.net'
type: string
esignetBackendServiceUrl:
description: 'Esignet backend service URL'
required: true
default: 'https://api.sandbox.mosip.net'
type: string
allow_env_edit:
description: 'Edit ENV'
required: true
default: 'true'
type: choice
options:
- false
- true
theme:
description: 'Application Theme'
required: true
default: 'orange'
type: choice
options:
- orange
- purple

jobs:
build-android:
uses: mosip/kattu/.github/workflows/android-build.yml@master
with:
NODE_VERSION: "16.x"
MIMOTO_HOST: ${{ inputs.mimotoBackendServiceUrl }}
ESIGNET_HOST: ${{ inputs.esignetBackendServiceUrl }}
APPLICATION_THEME: ${{ inputs.theme }}
ALLOW_ENV_EDIT: ${{ inputs.allow_env_edit }}
KEYSTORE_ALIAS: androidbuildkey
KEYSTORE_PASSWORD: 'password'
SERVICE_LOCATION: '.'
ANDROID_SERVICE_LOCATION: 'android'
BUILD_SCRIPT_LOCATION: 'scripts'
SCRIPT_NAME: './android-build.sh'
UPLOAD_TO_ACTIONS: 'true'
ANDROID_ARTIFACT_NAME: ${{ inputs.buildName }}
ANDROID_ARTIFACT_PATH: "android/app/build/outputs/apk/residentapp/release/Inji_universal.apk"
6 changes: 3 additions & 3 deletions .github/workflows/push-triggers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ jobs:
uses: mosip/kattu/.github/workflows/android-build.yml@master
with:
NODE_VERSION: "16.x"
DEBUG_KEYSTORE_ALIAS: androiddebugkey
KEYSTORE_ALIAS: androidbuildkey
KEYSTORE_PASSWORD: 'password'
SERVICE_LOCATION: '.'
ANDROID_SERVICE_LOCATION: 'android'
BUILD_SCRIPT_LOCATION: 'scripts'
SCRIPT_NAME: './android-build.sh'
secrets:
DEBUG_KEYSTORE_PASSWORD: '${{ secrets.INJI_ANDROID_DEBUG_STOREPASS }}'
UPLOAD_TO_ACTIONS: 'false'

build-ios:
uses: mosip/kattu/.github/workflows/ios-build.yml@master
Expand Down
4 changes: 1 addition & 3 deletions android/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ MIMOTO_HOST = ENV["MIMOTO_HOST"]
ESIGNET_HOST = ENV["ESIGNET_HOST"]
APPLICATION_THEME = ENV["APPLICATION_THEME"]
RELEASE_KEYSTORE_ALIAS = ENV["RELEASE_KEYSTORE_ALIAS"]
DEBUG_KEYSTORE_ALIAS = ENV["DEBUG_KEYSTORE_ALIAS"]
RELEASE_KEYSTORE_PASSWORD = ENV["RELEASE_KEYSTORE_PASSWORD"]
DEBUG_KEYSTORE_PASSWORD = ENV["DEBUG_KEYSTORE_PASSWORD"]
PLAY_CONSOLE_RELEASE_DESCRIPTION = ENV["BUILD_DESCRIPTION"]
SLACK_URL = ENV["SLACK_WEBHOOK_URL"]
CREDENTIAL_REGISTRY_EDIT = ENV["CREDENTIAL_REGISTRY_EDIT"]
Expand Down Expand Up @@ -46,7 +44,7 @@ end

desc "Verify Build for Android"
lane :android_build do
gradle(task: "assemble#{APP_FLAVOR}Debug")
gradle(task: "assembleResidentappRelease")
end

desc "Deploy an Internal testing version to the Google Play"
Expand Down

0 comments on commit d50a12c

Please sign in to comment.