Skip to content

Added CI/CD

Added CI/CD #1

Workflow file for this run

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 }}