Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build & Release Android #1

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Flutter CI

on:
push:

jobs:
apk:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '12.x'

- uses: subosito/flutter-action@v1
with:
channel: 'stable' # 'dev', 'alpha', default to: 'stable'
flutter-version: '2.2.0' # you can also specify exact version of flutter

#- run: flutter channel stable
#- run: flutter upgrade

- run: |
flutter clean
flutter pub get
flutter pub upgrade
#flutter build appbundle --release --no-tree-shake-icons --no-sound-null-safety #package:bluetoothadapter doesn't support null safety

- run: flutter build apk --no-sound-null-safety #package:bluetoothadapter doesn't support null safety

- run: |
cd build/app/outputs/flutter-apk/
mv app.apk blueshot.apk
ls -al
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release

on:
release:

jobs:
apk:
name: Release APK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
channel: 'stable' # 'dev', 'alpha', default to: 'stable'
- run: flutter pub get
- run: flutter build apk --no-sound-null-safety #package:bluetoothadapter doesn't support null safety
- run: cd build/app/outputs && tree
- run: |
cd build/app/outputs/flutter-apk/
mv app.apk blueshot.apk || true
mv app.apk.sha1 hashblue.apk.sha1 || true
mv app-release.apk blue-release.apk || true
mv app-debug.apk blue-bug.apk || true
ls -al
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUBTOKEN }}
file: build/app/outputs/flutter-apk/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true