From 8ac4e388a4aefcd92f2518510c76dc579fe7741d Mon Sep 17 00:00:00 2001 From: Jagandeep Brar Date: Sun, 23 Jan 2022 01:16:12 -0500 Subject: [PATCH] fix(ci): Move Discord update workflow into jobs to prevent depth errors --- .github/workflows/build_all_platforms.yml | 82 +++++++++++++---------- .github/workflows/update_discord.yml | 31 --------- 2 files changed, 47 insertions(+), 66 deletions(-) delete mode 100644 .github/workflows/update_discord.yml diff --git a/.github/workflows/build_all_platforms.yml b/.github/workflows/build_all_platforms.yml index 6f575fba..5c84eeae 100644 --- a/.github/workflows/build_all_platforms.yml +++ b/.github/workflows/build_all_platforms.yml @@ -105,6 +105,14 @@ jobs: name: android-${{ inputs.VERSION }} path: ${{ github.workspace }}/build/app/outputs/bundle/release/app-release.aab + - name: Discord Update + uses: sarisia/actions-status-discord@v1 + if: always() + with: + description: android-${{ inputs.VERSION }} + title: '[Android] `${{ inputs.FLAVOR}}` Build' + webhook: ${{ secrets.DISCORD_WEBHOOK }} + build_ios: name: Build iOS runs-on: macos-latest @@ -177,6 +185,14 @@ jobs: name: ios-${{ inputs.VERSION }} path: ${{ github.workspace }}/ios/Runner.ipa + - name: Discord Update + uses: sarisia/actions-status-discord@v1 + if: always() + with: + description: ios-${{ inputs.VERSION }} + title: '[iOS] `${{ inputs.FLAVOR}}` Build' + webhook: ${{ secrets.DISCORD_WEBHOOK }} + build_macos: name: Build macOS runs-on: macos-latest @@ -250,6 +266,14 @@ jobs: name: macos-${{ inputs.VERSION }} path: ${{ github.workspace }}/macos/LunaSea.pkg + - name: Discord Update + uses: sarisia/actions-status-discord@v1 + if: always() + with: + description: macos-${{ inputs.VERSION }} + title: '[macOS] `${{ inputs.FLAVOR}}` Build' + webhook: ${{ secrets.DISCORD_WEBHOOK }} + deploy_android: name: Deploy Android needs: build_android @@ -286,6 +310,14 @@ jobs: bundle install bundle exec fastlane deploy track:${{ inputs.FLAVOR }} aab:${{ github.workspace }}/app-release.aab version_name:${{ github.sha }} + - name: Discord Update + uses: sarisia/actions-status-discord@v1 + if: always() + with: + description: android-${{ inputs.VERSION }} + title: '[Android] `${{ inputs.FLAVOR}}` Deployment' + webhook: ${{ secrets.DISCORD_WEBHOOK }} + deploy_ios: name: Deploy iOS needs: build_ios @@ -327,6 +359,14 @@ jobs: bundle install bundle exec fastlane deploy groups:${{ inputs.FLAVOR }} ipa:${{ github.workspace }}/Runner.ipa + - name: Discord Update + uses: sarisia/actions-status-discord@v1 + if: always() + with: + description: ios-${{ inputs.VERSION }} + title: '[iOS] `${{ inputs.FLAVOR}}` Deployment' + webhook: ${{ secrets.DISCORD_WEBHOOK }} + deploy_macos: name: Deploy macOS needs: build_macos @@ -368,38 +408,10 @@ jobs: bundle install bundle exec fastlane deploy groups:${{ inputs.FLAVOR }} pkg:${{ github.workspace }}/LunaSea.pkg - discord_android: - name: Update Discord about Android Deployment - uses: CometTools/LunaSea/.github/workflows/update_discord.yml@master - needs: deploy_android - if: always() - with: - FLAVOR: internal - STATUS: ${{ job.status }} - PLATFORM: Android - secrets: - DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} - - discord_ios: - name: Update Discord about iOS Deployment - uses: CometTools/LunaSea/.github/workflows/update_discord.yml@master - needs: deploy_ios - if: always() - with: - FLAVOR: internal - STATUS: ${{ job.status }} - PLATFORM: iOS - secrets: - DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} - - discord_macos: - name: Update Discord about macOS Deployment - uses: CometTools/LunaSea/.github/workflows/update_discord.yml@master - needs: deploy_macos - if: always() - with: - FLAVOR: internal - STATUS: ${{ job.status }} - PLATFORM: macOS - secrets: - DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} + - name: Discord Update + uses: sarisia/actions-status-discord@v1 + if: always() + with: + description: macos-${{ inputs.VERSION }} + title: '[macOS] `${{ inputs.FLAVOR}}` Deployment' + webhook: ${{ secrets.DISCORD_WEBHOOK }} diff --git a/.github/workflows/update_discord.yml b/.github/workflows/update_discord.yml deleted file mode 100644 index 4dbe3c65..00000000 --- a/.github/workflows/update_discord.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: '[Discord] Update Discord Build Status' - -on: - workflow_call: - inputs: - STATUS: - required: true - type: string - FLAVOR: - required: true - type: string - PLATFORM: - required: true - type: string - - secrets: - DISCORD_WEBHOOK: - required: true - -jobs: - run: - name: Send Discord Update - runs-on: ubuntu-latest - - steps: - - uses: sarisia/actions-status-discord@v1 - with: - description: "[${{ inputs.PLATFORM }}] Build and deploy `${{ inputs.FLAVOR }}` build" - status: ${{ inputs.STATUS }} - title: '[${{inputs.PLATFORM }}/release] ${{ inputs.FLAVOR }}' - webhook: ${{ secrets.DISCORD_WEBHOOK }}