From a70b8d172bccb468a9c8c2a97ff4fb538816b9cc Mon Sep 17 00:00:00 2001 From: Giorgio Azzinnaro Date: Tue, 2 Jan 2024 19:02:22 +0100 Subject: [PATCH] ci: build workflow --- .github/workflows/build.yaml | 26 ++++++++++++++++++++++++++ pubspec.lock | 24 ++++++++++++++++++++++++ pubspec.yaml | 3 +++ 3 files changed, 53 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..22f9dff --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,26 @@ +name: Build +on: + push: + branches: + - main +jobs: + web: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Get Flutter + uses: subosito/flutter-action@v2.12.0 + with: + channel: 'stable' + - name: Download dependencies + run: flutter pub get + # - run: flutter test # TODO Needs supabase + - name: Configure git user + run: | + git config --global user.name "GitHub Actions Bot" + git config --global user.email "tech+gitbot@parousia.app" + - name: Compile web and put in gh-pages branch + run: dart run peanut + - name: Push gh-pages + run: git push origin gh-pages diff --git a/pubspec.lock b/pubspec.lock index b0156ed..b77c6e3 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -73,6 +73,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.4.1" + build_cli_annotations: + dependency: transitive + description: + name: build_cli_annotations + sha256: b59d2769769efd6c9ff6d4c4cede0be115a566afc591705c2040b707534b1172 + url: "https://pub.dev" + source: hosted + version: "2.1.0" build_config: dependency: transitive description: @@ -455,6 +463,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.0" + git: + dependency: transitive + description: + name: git + sha256: "1982737427ef1ef2bb69027ea0234469774495e86afe202de81ee46d37364e55" + url: "https://pub.dev" + source: hosted + version: "2.2.1" glob: dependency: transitive description: @@ -804,6 +820,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.2.1" + peanut: + dependency: "direct dev" + description: + name: peanut + sha256: "7dfafd7dad32f94863fe93d7ed59e0c5fb585fd9f874ff05c534f66995e2b2fb" + url: "https://pub.dev" + source: hosted + version: "5.0.0" petitparser: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 99ebe7e..10e13c0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -96,6 +96,9 @@ dev_dependencies: integration_test: sdk: flutter + # To deploy to CloudFlare Pages + peanut: ^5.0.0 + # To manage app flavours flutter_flavorizr: ^2.2.1