From 36dff084330c4edbeaff9b6f91072a6870b9a8b6 Mon Sep 17 00:00:00 2001 From: codeyzx Date: Thu, 9 May 2024 12:58:28 +0700 Subject: [PATCH] feat: add ci/cd config --- .github/workflows/build.yml | 15 +++++++++++++++ .github/workflows/deploy.yml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..f1fe8c2 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,15 @@ +name: ๐Ÿ”จ๐Ÿงช Build & Test + +permissions: write-all + +on: + pull_request: + branches: + - "main" + tags: + - "v*.*.*" + +jobs: + deploy: + name: ๐Ÿ”จ Deploy + uses: ./.github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..f6702b4 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,31 @@ +name: ๐Ÿ”จ Build App + +on: + workflow_call: + +jobs: + build: + name: Build Artifacts and Release + runs-on: ubuntu-latest + steps: + - name: โฌ‡๏ธ Checkout repository + uses: actions/checkout@v3 + - name: โš™๏ธ Setup Flutter + uses: subosito/flutter-action@v2 + with: + channel: "stable" + cache: true + - name: โš™๏ธ Install dependencies for all packages + run: | + flutter pub get + - name: ๐Ÿ”จ Build APK + run: | + flutter build apk --split-per-abi --release --obfuscate --split-debug-info=./symbols/ + - name: ๐Ÿ”จ Build APPBUNDLE + run: | + flutter build appbundle --release --obfuscate --split-debug-info=./symbols/ + - name: โš™๏ธ Create Github Release + uses: ncipollo/release-action@v1 + with: + artifacts: "build/app/outputs/apk/release/*.apk,build/app/outputs/bundle/release/*.aab" + tag: v1.0.${{ github.run_number }}