fix: Add support for Dart 3.4, 3.5; remove support for Dart 3.0, 3.1 … #57
Workflow file for this run
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
# To authenticate on pub.dev to publish a release via GitHub Actions, a tag | |
# needs to be pushed, see: https://dart.dev/tools/pub/automated-publishing | |
# | |
# Publishing cannot currently be triggered manually via a "workflow_dispatch", | |
# see: https://dart.dev/go/publishing-from-github | |
name: release-automated | |
on: | |
push: | |
tags: | |
- "dart-[0-9]+.[0-9]+.[0-9]+*" | |
- "flutter-[0-9]+.[0-9]+.[0-9]+*" | |
env: | |
package: ${{ startsWith(github.ref_name, 'dart') && 'dart' || 'flutter' }} | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.ref_name }} | |
- name: Setup dart | |
uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: '3.0' | |
- name: Setup flutter | |
if: env.package == 'flutter' | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
cache: true | |
- name: Install dart dependencies | |
run: dart pub get --directory 'packages/dart' | |
- name: Install flutter dependencies | |
if: env.package == 'flutter' | |
run: dart pub get --directory 'packages/flutter' | |
- name: Analyze dart | |
if: env.package == 'dart' | |
run: dart analyze --fatal-infos 'packages/${{ env.package }}' | |
- name: Analyze flutter | |
if: env.package == 'flutter' | |
run: flutter analyze --fatal-infos 'packages/${{ env.package }}' | |
- name: Lint | |
run: dart format --output=none --set-exit-if-changed 'packages/${{ env.package }}' | |
- name: Publish package (dry-run) | |
working-directory: 'packages/${{ env.package }}' | |
run: dart pub publish --dry-run | |
- name: Publish package | |
working-directory: 'packages/${{ env.package }}' | |
run: dart pub publish --force | |
docs-publish: | |
needs: release | |
uses: parse-community/Parse-SDK-Flutter/.github/workflows/release-manual-docs.yml@master | |
with: | |
tag: ${{ github.ref_name }} |