Removed warnings from example #16
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
name: Test, Build & Release | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
release: | |
name: Test, Build & Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Setup Java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '12.x' | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v1 | |
with: | |
channel: stable | |
- name: Cache pub dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ${{ env.FLUTTER_HOME }}/.pub-cache | |
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }} | |
restore-keys: ${{ runner.os }}-pub- | |
- name: Download pub dependencies | |
run: flutter pub get | |
- name: Run Unit Testing | |
run: flutter test test/uri_to_file_test.dart | |
- name: Create App Version Env | |
run: echo 'APP_VERSION'=`awk '/version:/ || /version:/{print}' ./pubspec.yaml | awk -F' ' '{print $2}' | awk -F'+' '{print $1}'` >> $GITHUB_ENV | |
- name: Create Release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: 'v${{ env.APP_VERSION }}' | |
release_name: 'Release v${{ env.APP_VERSION }}' | |
draft: false | |
prerelease: false |