Skip to content

Commit

Permalink
added action
Browse files Browse the repository at this point in the history
  • Loading branch information
vivekgugnani authored Dec 30, 2020
1 parent 1f0f1fb commit 3c94cd7
Showing 1 changed file with 36 additions and 22 deletions.
58 changes: 36 additions & 22 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,47 @@
name: Android CI

on:
push:
branches: [ master ]
tags:
- "v*"
pull_request:
branches: [ master ]

jobs:
build:

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:
flutter-version: '1.22.5'
- run: flutter pub get
- uses: underwindfall/create-release-with-debugapk@v1.2.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: 1.0
release_name: Release ${{ steps.get_version.outputs.VERSION }}
asset_path: .dart_tools
asset_name: Example.apk
asset_content_type: application/zip
draft: false
prerelease: false

- name: Checkout code
uses: actions/checkout@v2

- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
flutter-version: '1.22.5'
- run: flutter pub get
- run: flutter build apk --split-per-abi
- name: Upload APK
uses: actions/upload-artifact@v1
with:
name: apk
path: pubspec.yaml
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

- name: Create Release and Upload debug APK
uses: underwindfall/create-release-with-debugapk@v1.2.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.VERSION }}
release_name: Release ${{ steps.get_version.outputs.VERSION }}
asset_path: build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk
asset_name: app-release.apk
asset_content_type: application/apk
draft: false
prerelease: false

0 comments on commit 3c94cd7

Please sign in to comment.