Skip to content

Commit

Permalink
Added CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
EsinShadrach committed Apr 10, 2024
1 parent 40e63ba commit cb31bc7
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Run Build on app

on:
push:
branches:
- main

jobs:
build:
name: Build App
runs-on: ubuntu-latest
steps:
- name: Cache Flutter Dependencies
uses: actions/cache@v2
with:
path: |
~/.pub-cache
key: ${{ runner.os }}-flutter-${{ hashFiles('**/pubspec.yaml') }}

- name: Check Out Code
uses: actions/checkout@v4

- name: Get Flutter Action
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:"
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:"
pub-cache-key: "flutter-pub:os:-:channel:-:version:-:arch:-:hash:"
pub-cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:"

- name: Echo Flutter Versions
run: |
flutter --version
dart --version
- name: Run Pub get
run: flutter pub get

- name: Setup JDK 17
uses: actions/setup-java@v2
with:
distribution: "temurin"
java-version: "17"

- name: Run flutter build
run: flutter build apk --release --split-per-abi

- name: Debug Build Path
run: ls -l build/app/outputs/apk/release

- name: Create Release
uses: ncipollo/release-action/@v1
with:
artifacts: "build/app/outputs/apk/release/*.apk"
name: Wordy
tag: v1.0.${{ github.run_number }}
token: ${{ secrets.FLUTTER }}

0 comments on commit cb31bc7

Please sign in to comment.