mirror of
https://github.com/madari-media/madari-oss.git
synced 2026-01-11 22:40:23 +00:00
68 lines
1.4 KiB
YAML
68 lines
1.4 KiB
YAML
name: Build and Deploy
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
jobs:
|
|
build-windows:
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
flutter-version: '3.24.3'
|
|
channel: 'stable'
|
|
|
|
- name: Install dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Touch .env
|
|
run: touch .env
|
|
|
|
- run: make build
|
|
|
|
- name: Build Windows
|
|
run: make build_windows
|
|
|
|
- name: Upload Windows artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: windows-build
|
|
path: build/windows/x64/runner/Release/
|
|
|
|
build-web-deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
flutter-version: '3.24.3'
|
|
channel: 'stable'
|
|
|
|
- name: Install dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Touch .env
|
|
run: touch .env
|
|
|
|
- run: make build
|
|
|
|
- name: Build Web
|
|
run: make build_web
|
|
|
|
- name: Deploy to Cloudflare Pages
|
|
uses: cloudflare/pages-action@v1
|
|
with:
|
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
projectName: madari-dev
|
|
directory: build/web
|