From 23d80ef963c45a1f643032cd307ebba533236a38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=20Kazami=20=5B=E4=B9=94=E6=B2=BB=C2=B7=E9=A2=A8?= =?UTF-8?q?=E8=A6=8B=5D?= Date: Thu, 16 Feb 2023 03:45:03 +0000 Subject: [PATCH] Update app-prebuild.yml --- .github/workflows/app-prebuild.yml | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/.github/workflows/app-prebuild.yml b/.github/workflows/app-prebuild.yml index 26394d7..81fc0b7 100644 --- a/.github/workflows/app-prebuild.yml +++ b/.github/workflows/app-prebuild.yml @@ -7,6 +7,7 @@ on: # Triggers the workflow on push or pull request events but only for the "main" branch push: branches: [ "main" ] + tags: [ "v*" ] # pull_request: # branches: [ "main" ] @@ -48,9 +49,28 @@ jobs: channel: 'stable' # or: 'beta', 'dev' or 'master' cache: true - - run: flutter pub get # - run: flutter test - run: flutter build apk - - run: ls -la - - run: ls -la build + - name: list artifacts + run: | + ls -la + ls -la build/app/outputs/apk/release + + - name: upload apk + uses: actions/upload-artifact@v3 + with: + name: app-release.apk + path: build/app/outputs/apk/release/app-release.apk + + - name: upload all artifacts + uses: actions/upload-artifact@v3 + with: + name: all.zip + path: build/app/outputs/apk/release/ + + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: build/app/outputs/apk/release/app-release.apk