diff --git a/.github/workflows/fastlane-promote.action.yaml b/.github/workflows/fastlane-promote.action.yaml new file mode 100644 index 00000000..220070c5 --- /dev/null +++ b/.github/workflows/fastlane-promote.action.yaml @@ -0,0 +1,37 @@ +name: Fastlane - Track promotion + +on: + workflow_dispatch: + inputs: + origin_track: + description: 'Origin track of the promotion' + required: true + default: 'beta' + type: choice + options: + - beta + destination_track: + description: 'Destination track of the promotion' + required: true + default: 'production' + type: choice + options: + - production + +jobs: + play_store: + name: 'Play Store' + runs-on: ubuntu-latest + steps: + - name: 'Decrypt secret configuration' + run: ./.github/scripts/decrypt_secret.sh + env: + PASSPHRASE: ${{ secrets.PASSPHRASE }} + - name: 'Fastlane promote ${{ inputs.origin_track }} to ${{ inputs.destination_track }}' + uses: maierj/fastlane-action@v3.0.0 + with: + lane: track_promotion + options: '{ "origin_track": "${{ inputs.origin_track }}", "destination_track": "${{ inputs.destination_track }}" }' + subdirectory: 'android' + env: + SUPPLY_UPLOAD_MAX_RETRIES: 5 diff --git a/android/fastlane/Fastfile b/android/fastlane/Fastfile index 81322653..901e7ef3 100644 --- a/android/fastlane/Fastfile +++ b/android/fastlane/Fastfile @@ -29,4 +29,12 @@ platform :android do aab: "#{root_path}/app-release.aab" ) end + + desc "Upload to Play Store : Promote track" + lane :track_promotion do + upload_to_play_store( + track: options[:origin_track], + track_promote_to: options[:destination_track] + ) + end end