From f76290e0f2dc38c7bb05c33350c3292f7fc9ae18 Mon Sep 17 00:00:00 2001 From: Mohsen <56779182+mrtnetwork@users.noreply.github.com> Date: Tue, 25 Jun 2024 21:08:40 +0330 Subject: [PATCH] Create dart.yml --- .github/workflows/dart.yml | 47 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/dart.yml diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml new file mode 100644 index 00000000..8bbd8cce --- /dev/null +++ b/.github/workflows/dart.yml @@ -0,0 +1,47 @@ +name: Build Windows Application + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Navigate to project directory + run: cd mrt_wallet + + - name: Set Flutter directory + run: echo "FLUTTER_ROOT=flutter_sdk" >> $GITHUB_ENV + + - name: Download and set up Flutter + run: | + curl -L -o flutter.zip https://storage.googleapis.com/flutter_infra_release/releases/stable/windows/flutter_windows_3.3.8-stable.zip + Expand-Archive -Path flutter.zip -DestinationPath ${{ env.FLUTTER_ROOT }} + echo "${{ env.FLUTTER_ROOT }}\flutter\bin" >> $GITHUB_PATH + + - name: Install dependencies + run: flutter pub get + working-directory: mrt_wallet + + - name: Enable Windows desktop + run: flutter config --enable-windows-desktop + working-directory: mrt_wallet + + - name: Build Windows + run: flutter build windows --release + working-directory: mrt_wallet + + - name: Archive build artifacts + uses: actions/upload-artifact@v2 + with: + name: windows-build + path: mrt_wallet/build/windows/runner/Release/