diff --git a/.github/workflows/build_apk.yml b/.github/workflows/build_apk.yml index fc260ce..d0af2de 100644 --- a/.github/workflows/build_apk.yml +++ b/.github/workflows/build_apk.yml @@ -30,6 +30,10 @@ on: type: boolean description: Use stage backend default: true + upload-artifact: + type: boolean + description: Upload build to artifacts + default: true workflow_dispatch: inputs: version: @@ -59,6 +63,10 @@ on: type: boolean description: Use stage backend default: true + upload-artifact: + type: boolean + description: Upload build to artifacts + default: true env: BUILD_ARGS: --release --flavor ${{ inputs.flavor }} -t lib/main_${{ inputs.flavor }}.dart @@ -136,6 +144,7 @@ jobs: run: flutter build ${{ inputs.binary-type }} $BUILD_ARGS - name: Upload ${{ inputs.binary-type }} to artifacts + if: ${{ inputs.upload-artifact }} uses: actions/upload-artifact@v4 with: name: m3_lightmeter_${{ inputs.binary-type }} diff --git a/.github/workflows/build_ipa.yml b/.github/workflows/build_ipa.yml index 5a22573..4313da1 100644 --- a/.github/workflows/build_ipa.yml +++ b/.github/workflows/build_ipa.yml @@ -22,6 +22,10 @@ on: type: boolean description: Use stage backend default: true + upload-artifact: + type: boolean + description: Upload build to artifacts + default: true workflow_dispatch: inputs: version: @@ -36,6 +40,10 @@ on: type: boolean description: Use stage backend default: true + upload-artifact: + type: boolean + description: Upload build to artifacts + default: true env: FLAVOR: "prod" @@ -135,6 +143,7 @@ jobs: --export-options-plist=ios/Runner/ExportOptions.plist - name: Upload artifact + if: ${{ inputs.upload-artifact }} uses: actions/upload-artifact@v4 with: name: m3_lightmeter_ipa diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 74814a6..ad5f280 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -86,6 +86,7 @@ jobs: with: binary-type: ${{ matrix.binary-type }} flavor: prod + upload-artifact: true stage-backend: false version: ${{ inputs.version }} @@ -96,6 +97,7 @@ jobs: uses: ./.github/workflows/build_ipa.yml secrets: inherit with: + upload-artifact: true stage-backend: false version: ${{ inputs.version }} diff --git a/.github/workflows/pr_check.yml b/.github/workflows/pr_check.yml index 9adf567..20cdd55 100644 --- a/.github/workflows/pr_check.yml +++ b/.github/workflows/pr_check.yml @@ -64,6 +64,7 @@ jobs: with: binary-type: apk flavor: prod + upload-artifact: false stage-backend: false version: "1.0.0" @@ -74,20 +75,6 @@ jobs: uses: ./.github/workflows/build_ipa.yml secrets: inherit with: + upload-artifact: false stage-backend: false version: "1.0.0" - - cleanup: - name: Cleanup - if: ${{ always() }} - needs: [build-android, build-ios] - runs-on: ubuntu-latest - steps: - - name: Delete release artifacts - uses: geekyeggo/delete-artifact@v2 - with: - failOnError: false - name: | - m3_lightmeter_apk - m3_lightmeter_appbundle - m3_lightmeter_ipa