diff --git a/.github/workflows/all_platforms.yml b/.github/workflows/all_platforms.yml index 0ff0050d..c8de2364 100644 --- a/.github/workflows/all_platforms.yml +++ b/.github/workflows/all_platforms.yml @@ -45,56 +45,63 @@ jobs: build_android: if: ${{ (github.event.inputs.android || 'true') == 'true' }} uses: CometTools/LunaSea/.github/workflows/build_android.yml@master - secrets: + with: FLAVOR: ${{ github.event.inputs.flavor || 'internal' }} + VERSION: ${{ github.event.inputs.flavor || 'internal' }}-${{ github.sha }} + secrets: GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} KEY_JKS: ${{ secrets.KEY_JKS }} KEY_PROPERTIES: ${{ secrets.KEY_PROPERTIES }} - VERSION: ${{ github.event.inputs.flavor || 'internal' }}-${{ github.sha }} build_ios: if: ${{ (github.event.inputs.ios || 'true') == 'true' }} uses: CometTools/LunaSea/.github/workflows/build_ios.yml@master + with: + FLAVOR: ${{ github.event.inputs.flavor || 'internal' }} + VERSION: ${{ github.event.inputs.flavor || 'internal' }}-${{ github.sha }} secrets: APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_ITC_TEAM_ID: ${{ secrets.APPLE_ITC_TEAM_ID }} APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} - FLAVOR: ${{ github.event.inputs.flavor || 'internal' }} GOOGLE_SERVICE_INFO_PLIST: ${{ secrets.GOOGLE_SERVICE_INFO_PLIST }} MATCH_KEYCHAIN_NAME: ${{ secrets.MATCH_KEYCHAIN_NAME }} MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_SSH_PRIVATE_KEY: ${{ secrets.MATCH_SSH_PRIVATE_KEY }} - VERSION: ${{ github.event.inputs.flavor || 'internal' }}-${{ github.sha }} build_macos: if: ${{ (github.event.inputs.macos || 'true') == 'true' }} uses: CometTools/LunaSea/.github/workflows/build_macos.yml@master + with: + FLAVOR: ${{ github.event.inputs.flavor || 'internal' }} + VERSION: ${{ github.event.inputs.flavor || 'internal' }}-${{ github.sha }} secrets: APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_ITC_TEAM_ID: ${{ secrets.APPLE_ITC_TEAM_ID }} APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} - FLAVOR: ${{ github.event.inputs.flavor || 'internal' }} GOOGLE_SERVICE_INFO_PLIST: ${{ secrets.GOOGLE_SERVICE_INFO_PLIST }} MATCH_KEYCHAIN_NAME: ${{ secrets.MATCH_KEYCHAIN_NAME }} MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_SSH_PRIVATE_KEY: ${{ secrets.MATCH_SSH_PRIVATE_KEY }} - VERSION: ${{ github.event.inputs.flavor || 'internal' }}-${{ github.sha }} deploy_android: needs: build_android if: ${{ (github.event.inputs.deploy || 'true') == 'true' }} uses: CometTools/LunaSea/.github/workflows/deploy_android.yml@master - secrets: + with: FLAVOR: ${{ github.event.inputs.flavor || 'internal' }} - GOOGLE_PLAY_API: ${{ secrets.GOOGLE_PLAY_API }} VERSION: ${{ github.event.inputs.flavor || 'internal' }}-${{ github.sha }} + secrets: + GOOGLE_PLAY_API: ${{ secrets.GOOGLE_PLAY_API }} deploy_ios: needs: build_ios if: ${{ (github.event.inputs.deploy || 'true') == 'true' }} uses: CometTools/LunaSea/.github/workflows/deploy_ios.yml@master + with: + FLAVOR: ${{ github.event.inputs.flavor || 'internal' }} + VERSION: ${{ github.event.inputs.flavor || 'internal' }}-${{ github.sha }} secrets: APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_ITC_TEAM_ID: ${{ secrets.APPLE_ITC_TEAM_ID }} @@ -103,13 +110,14 @@ jobs: APPLE_STORE_CONNECT_KEY_ID: ${{ secrets.APPLE_STORE_CONNECT_KEY_ID }} APPLE_STORE_CONNECT_ISSUER_ID: ${{ secrets.APPLE_STORE_CONNECT_ISSUER_ID }} APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} - FLAVOR: ${{ github.event.inputs.flavor || 'internal' }} - VERSION: ${{ github.event.inputs.flavor || 'internal' }}-${{ github.sha }} deploy_macos: needs: build_macos if: ${{ (github.event.inputs.deploy || 'true') == 'true' }} uses: CometTools/LunaSea/.github/workflows/deploy_macos.yml@master + with: + FLAVOR: ${{ github.event.inputs.flavor || 'internal' }} + VERSION: ${{ github.event.inputs.flavor || 'internal' }}-${{ github.sha }} secrets: APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_ITC_TEAM_ID: ${{ secrets.APPLE_ITC_TEAM_ID }} @@ -118,5 +126,3 @@ jobs: APPLE_STORE_CONNECT_KEY_ID: ${{ secrets.APPLE_STORE_CONNECT_KEY_ID }} APPLE_STORE_CONNECT_ISSUER_ID: ${{ secrets.APPLE_STORE_CONNECT_ISSUER_ID }} APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} - FLAVOR: ${{ github.event.inputs.flavor || 'internal' }} - VERSION: ${{ github.event.inputs.flavor || 'internal' }}-${{ github.sha }} diff --git a/.github/workflows/build_android.yml b/.github/workflows/build_android.yml index c6632811..eb544dbb 100644 --- a/.github/workflows/build_android.yml +++ b/.github/workflows/build_android.yml @@ -2,17 +2,21 @@ name: '[Build] Android' on: workflow_call: - secrets: + inputs: FLAVOR: required: true + type: string + VERSION: + required: true + type: string + + secrets: GOOGLE_SERVICES_JSON: required: true KEY_JKS: required: true KEY_PROPERTIES: required: true - VERSION: - required: true jobs: build: @@ -29,7 +33,7 @@ jobs: - name: Set Flavor working-directory: ${{ github.workspace }} run: | - echo $'FLAVOR=${{ secrets.FLAVOR }}\nCOMMIT=${{ github.sha }}' > .flavor + echo $'FLAVOR=${{ inputs.FLAVOR }}\nCOMMIT=${{ github.sha }}' > .flavor - name: Install Secret Keys working-directory: ${{ github.workspace }} @@ -69,5 +73,5 @@ jobs: - name: Upload App Bundle Artifact uses: actions/upload-artifact@v2 with: - name: android-${{ secrets.VERSION }} + name: android-${{ inputs.VERSION }} path: ${{ github.workspace }}/build/app/outputs/bundle/release/app-release.aab diff --git a/.github/workflows/build_ios.yml b/.github/workflows/build_ios.yml index 7c1c6e0f..29ee952c 100644 --- a/.github/workflows/build_ios.yml +++ b/.github/workflows/build_ios.yml @@ -2,6 +2,14 @@ name: '[Build] iOS' on: workflow_call: + inputs: + FLAVOR: + required: true + type: string + VERSION: + required: true + type: string + secrets: APPLE_ID: required: true @@ -9,8 +17,6 @@ on: required: true APPLE_TEAM_ID: required: true - FLAVOR: - required: true GOOGLE_SERVICE_INFO_PLIST: required: true MATCH_KEYCHAIN_NAME: @@ -21,8 +27,6 @@ on: required: true MATCH_SSH_PRIVATE_KEY: required: true - VERSION: - required: true jobs: build: @@ -39,7 +43,7 @@ jobs: - name: Set Flavor working-directory: ${{ github.workspace }} run: | - echo $'FLAVOR=${{ secrets.FLAVOR }}\nCOMMIT=${{ github.sha }}' > .flavor + echo $'FLAVOR=${{ inputs.FLAVOR }}\nCOMMIT=${{ github.sha }}' > .flavor - name: Select Xcode Version uses: maxim-lobanov/setup-xcode@v1 @@ -91,5 +95,5 @@ jobs: - name: Upload App Package Artifact uses: actions/upload-artifact@v2 with: - name: ios-${{ secrets.VERSION }} + name: ios-${{ inputs.VERSION }} path: ${{ github.workspace }}/ios/Runner.ipa diff --git a/.github/workflows/build_macos.yml b/.github/workflows/build_macos.yml index 2312f69c..52f7843b 100644 --- a/.github/workflows/build_macos.yml +++ b/.github/workflows/build_macos.yml @@ -39,7 +39,7 @@ jobs: - name: Set Flavor working-directory: ${{ github.workspace }} run: | - echo $'FLAVOR=${{ secrets.FLAVOR }}\nCOMMIT=${{ github.sha }}' > .flavor + echo $'FLAVOR=${{ inputs.FLAVOR }}\nCOMMIT=${{ github.sha }}' > .flavor - name: Select Xcode Version uses: maxim-lobanov/setup-xcode@v1 @@ -92,5 +92,5 @@ jobs: - name: Upload App Package Artifact uses: actions/upload-artifact@v2 with: - name: macos-${{ secrets.VERSION }} + name: macos-${{ inputs.VERSION }} path: ${{ github.workspace }}/macos/LunaSea.pkg diff --git a/.github/workflows/deploy_android.yml b/.github/workflows/deploy_android.yml index 0700a3ef..459b773a 100644 --- a/.github/workflows/deploy_android.yml +++ b/.github/workflows/deploy_android.yml @@ -2,13 +2,17 @@ name: '[Deploy] Android' on: workflow_call: - secrets: + inputs: FLAVOR: required: true - GOOGLE_PLAY_API: - required: true + type: string VERSION: required: true + type: string + + secrets: + GOOGLE_PLAY_API: + required: true jobs: deploy: @@ -25,7 +29,7 @@ jobs: - name: Download App Bundle Artifact uses: actions/download-artifact@v2 with: - name: android-${{ secrets.VERSION }} + name: android-${{ inputs.VERSION }} path: ${{ github.workspace }} - name: Install Secret Keys @@ -42,4 +46,4 @@ jobs: SUPPLY_JSON_KEY: ${{ github.workspace }}/.fastlane-android-auth.json run: | bundle install - bundle exec fastlane deploy track:${{ secrets.FLAVOR }} aab:${{ github.workspace }}/app-release.aab version_name:android-${{ secrets.VERSION }} + bundle exec fastlane deploy track:${{ inputs.FLAVOR }} aab:${{ github.workspace }}/app-release.aab version_name:android-${{ inputs.VERSION }} diff --git a/.github/workflows/deploy_ios.yml b/.github/workflows/deploy_ios.yml index 2a6f7dba..aea4319d 100644 --- a/.github/workflows/deploy_ios.yml +++ b/.github/workflows/deploy_ios.yml @@ -2,6 +2,14 @@ name: '[Deploy] iOS' on: workflow_call: + inputs: + FLAVOR: + required: true + type: string + VERSION: + required: true + type: string + secrets: APPLE_ID: required: true @@ -17,10 +25,6 @@ on: required: true APPLE_TEAM_ID: required: true - FLAVOR: - required: true - VERSION: - required: true jobs: deploy: @@ -37,7 +41,7 @@ jobs: - name: Download App Package Artifact uses: actions/download-artifact@v2 with: - name: ios-${{ secrets.VERSION }} + name: ios-${{ inputs.VERSION }} path: ${{ github.workspace }} - name: Install Secret Keys @@ -59,4 +63,4 @@ jobs: APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} run: | bundle install - bundle exec fastlane deploy groups:${{ secrets.FLAVOR }} ipa:${{ github.workspace }}/Runner.ipa + bundle exec fastlane deploy groups:${{ inputs.FLAVOR }} ipa:${{ github.workspace }}/Runner.ipa diff --git a/.github/workflows/deploy_macos.yml b/.github/workflows/deploy_macos.yml index b96527f9..13573efd 100644 --- a/.github/workflows/deploy_macos.yml +++ b/.github/workflows/deploy_macos.yml @@ -2,6 +2,14 @@ name: '[Deploy] macOS' on: workflow_call: + inputs: + FLAVOR: + required: true + type: string + VERSION: + required: true + type: string + secrets: APPLE_ID: required: true @@ -17,10 +25,6 @@ on: required: true APPLE_TEAM_ID: required: true - FLAVOR: - required: true - VERSION: - required: true jobs: deploy: @@ -37,7 +41,7 @@ jobs: - name: Download App Package Artifact uses: actions/download-artifact@v2 with: - name: macos-${{ secrets.VERSION }} + name: macos-${{ inputs.VERSION }} path: ${{ github.workspace }} - name: Install Secret Keys @@ -59,4 +63,4 @@ jobs: APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} run: | bundle install - bundle exec fastlane deploy groups:${{ secrets.FLAVOR }} pkg:${{ github.workspace }}/LunaSea.pkg + bundle exec fastlane deploy groups:${{ inputs.FLAVOR }} pkg:${{ github.workspace }}/LunaSea.pkg