skip artifact upload for PR checks

This commit is contained in:
Vadim 2025-01-27 13:37:13 +01:00
parent 9189df71c0
commit b49bca46ba
4 changed files with 22 additions and 15 deletions

View file

@ -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 }}

View file

@ -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

View file

@ -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 }}

View file

@ -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