Prepare v0.16.1 releases #2067
Workflow file for this run
This file contains hidden or 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: Backward compatibility | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches-ignore: | |
| - release/beta | |
| - release/master | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| package: | |
| - core | |
| - enhanced | |
| name: ${{ matrix.package }} | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| defaults: | |
| run: | |
| working-directory: packages/${{ matrix.package }} | |
| env: | |
| GOLDEN_SKIP: "yes" | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Update pubspec.yaml | |
| run: | | |
| set -e | |
| sudo snap install yq | |
| # delete all overrides and use pub.dev versions | |
| yq e 'del(.dependency_overrides)' -i pubspec.yaml | |
| # back up SDK constraint | |
| _sdkVersion=$( yq e .environment.sdk pubspec.yaml ) | |
| # replace: | |
| # foo: ^1.0.0 | |
| # bar: ^2.0.0-0 | |
| # into: | |
| # foo: 1.0.0 | |
| # bar: ^2.0.0-0 (unchanged) | |
| sed -i'' -e 's#^\( [^:]*\): ^\([0-9.]*\)$#\1: \2#' pubspec.yaml | |
| # replace: | |
| # foo: ">=1.0.0" | |
| # bar: ">=2.0.0 <4.0.0" | |
| # yolo: ">=3.0.0-0" | |
| # into: | |
| # foo: 1.0.0 | |
| # bar: 2.0.0 | |
| # yolo: ">=3.0.0-0" (unchanged) | |
| sed -i'' -e 's#^\( [^:]*\): ">=\([0-9.]*\)\( <.*\)\{0,1\}"$#\1: \2#' pubspec.yaml | |
| # restore SDK constraint | |
| yq e ".environment.sdk = \"${_sdkVersion}\"" -i pubspec.yaml | |
| # output for debugging | |
| cat pubspec.yaml | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@e938fdf56512cc96ef2f93601a5a40bde3801046 # v2.19.0 | |
| with: | |
| flutter-version-file: packages/${{ matrix.package }}/pubspec.yaml | |
| - run: flutter test |