chore: update flutter version in flutter_version.json to 3.16.2 (#131) #68
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
on: | |
push: | |
branches: | |
- main | |
paths: | |
- .github/workflows/update_flutter_dependencies.yml | |
- config/flutter_version.json | |
workflow_dispatch: | |
jobs: | |
update_version: | |
permissions: | |
id-token: write # Enable OIDC token because Gitsign creates keys based on the GitHub runner OIDC credentials | |
contents: write | |
pull-requests: write | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- name: Copy Flutter version into version manifest | |
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7 | |
with: | |
script: | | |
const script = require('./script/copyFlutterVersion.js') | |
await script({core}) | |
- name: Update latest Fastlane version | |
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7 | |
with: | |
script: | | |
const script = require('./script/updateFastlaneVersion.js') | |
await script({core, fetch}) | |
- name: Setup Flutter | |
uses: flutter-actions/setup-flutter@4fd02585c76876e31a810dcc631864fe1c96c3bf # v2.3 | |
with: | |
cache: true | |
channel: ${{ env.FLUTTER_CHANNEL }} | |
version: ${{ env.FLUTTER_VERSION }} | |
# TODO: Create test app in specific folder with step id, to allow parallel execution | |
- name: Create test application | |
run: | | |
flutter create test_app | |
# TODO: Cache gradle https://github.com/gradle/gradle-build-action | |
- name: Update default Android platform versions in Flutter | |
working-directory: test_app/android | |
run: | | |
cat ../../script/updateAndroidVersions.gradle >> app/build.gradle | |
./gradlew --warning-mode all updateAndroidVersions | |
- name: Clean test application | |
run: | | |
rm -rf test_app | |
- name: Setup Cue for JSON validation | |
uses: cue-lang/setup-cue@1713281ae501e533ff06108005dffeab9e2e5203 # v1.0.0 | |
- name: Validate version.json | |
run: cue vet config/version.cue config/version.json | |
- name: Setup NodeJS | |
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4 | |
with: | |
cache: 'npm' | |
cache-dependency-path: docs/src/package-lock.json | |
node-version-file: docs/src/package.json | |
- name: Update documentation | |
working-directory: docs/src | |
run: | | |
npm ci --prefer-offline | |
npm run build | |
- name: Setup Gitsign to sign git commits | |
uses: chainguard-dev/actions/setup-gitsign@e74da3cd82dab55e35736f1ef031a12fa5b95299 # main | |
- name: Create commit message variable | |
run: | | |
echo "COMMIT_MESSAGE=chore: update flutter dependencies in version.json for ${{ env.FLUTTER_VERSION }}" >> $GITHUB_ENV | |
- name: Create pull request if there are changes | |
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5 | |
with: | |
commit-message: ${{ env.COMMIT_MESSAGE }} | |
branch: update-flutter-dependencies/${{ env.FLUTTER_VERSION }} | |
title: ${{ env.COMMIT_MESSAGE }} | |
token: ${{ secrets.GH_APP_TOKEN}} |