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/