Skip to content
play

GitHub Action

Get Flutter Version

v1.0.0 Latest version

Get Flutter Version

play

Get Flutter Version

Extract flutter version number and build number from pubspec.yaml

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Get Flutter Version

uses: its404/get-flutter-version@v1.0.0

Learn more about this action in its404/get-flutter-version

Choose a version

Get flutter version

Get flutter verion number and build number from pubspec.yaml

Outputs

  • version_number: The flutter version number in pubspect.yaml
  • builder_number: The flutter build number in pubspect.yaml

Example workflow - get flutter version number and build number

On every push to master branch

name: "build"
on: # rebuild on master branch changes
  push:
    branches:
      - master

jobs:
  build: # make sure build/ci work properly
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Get flutter version
        id: get_flutter_version
        uses: its404/get-flutter-version@v1.0.0
      - name: Output flutter version
        run: echo 'version_number:' ${{ steps.get_flutter_version.outputs.version_number }} ' build_number:' ${{ steps.get_flutter_version.outputs.build_number }}