-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
40e63ba
commit cb31bc7
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |