Skip to content

4.7.0+3

4.7.0+3 #97

# This workflow tests and releases the latest build
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build-and-test"
build-and-test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Use the standard Java Action to setup Java
# we want the latest Java 12
- uses: actions/setup-java@v1
with:
java-version: '12.x'
# Use the community Action to install Flutter
# we want the stable channel
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
# Get flutter packages
- run: flutter pub get
# Check for any formatting issues in the code.
- run: dart format .
# Analyze our Dart code, but don't fail with there are issues.
- run: flutter analyze . --preamble --no-fatal-infos --no-fatal-warnings
# Run our tests
- run: flutter test --coverage
# Upload to codecov
- uses: codecov/codecov-action@v2
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage/lcov.info
# Get current datetime in ISO format
- id: date
run: echo "RELEASE_DATE=$(date -u +'%Y-%m-%d')" >> $GITHUB_OUTPUT
# Create a Release
- uses: softprops/action-gh-release@v1
env:
# This token is provided by Actions, you do not need to create your own token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.date.outputs.RELEASE_DATE }}build${{ github.run_number }}
name: ${{ steps.date.outputs.RELEASE_DATE }}build${{ github.run_number }}
body: |
See CHANGELOG.md
draft: false
prerelease: false