Skip to content

4.13.0

4.13.0 #115

# This workflow tests and releases the latest build
name: build
# 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
# Repository: https://github.com/actions/checkout
- uses: actions/checkout@v3
# Use the standard Java Action to setup Java
# we want the latest Java 12
# Repository: https://github.com/actions/setup-java
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17' #'12.x'
# Use the community Action to install Flutter we want the stable channel
# Repository: https://github.com/subosito/flutter-action for latest version
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
# Get flutter packages
- run: flutter pub get
# # Check for any formatting issues in the code.
# - run: flutter 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
# Repository: https://github.com/codecov/codecov-action
- uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage/lcov.info
# Get current datetime in ISO format
- id: date
# run: echo "::set-output name=date::$(date -u +'%Y-%m-%d')"
# run: echo "{date}={$(date -u +'%Y-%m-%d')}" >> $GITHUB_OUTPUT
run: echo "RELEASE_DATE=$(date -u +'%Y-%m-%d')" >> $GITHUB_OUTPUT
# Create a Release
# Repository: https://github.com/softprops/action-gh-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