Skip to content

refactor and clean up code, update README #48

refactor and clean up code, update README

refactor and clean up code, update README #48

Workflow file for this run

name: release apk
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
channel: 'beta'
- working-directory: ./open_earable
run: flutter pub get
- working-directory: ./open_earable
run: flutter build apk
- uses: actions/upload-artifact@v1
with:
name: release-apk
path: open_earable/build/app/outputs/apk/release/app-release.apk
release:
permissions: write-all
runs-on: ubuntu-latest
needs: build
steps:
- name: Download APK Artifact
uses: actions/download-artifact@v2
with:
name: release-apk
path: ${{ github.workspace }}/release-apk
- uses: benjlevesque/[email protected]
id: short-sha
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: false
prerelease: false
release_name: Release ${{ github.event.head_commit.message }}
tag_name: ${{ env.SHA }}
- name: Upload APK as Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/release-apk/app-release.apk
asset_name: app-release.apk
asset_content_type: application/vnd.android.package-archive