diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 5149643e..23f04eff 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -2,11 +2,11 @@ name: Publish package to pub.dev on: push: tags: - - 'v[0-9]+.[0-9]+.[0-9]+*' + - "v[0-9]+.[0-9]+.[0-9]+*" jobs: build_example: - name: Build Example App + name: Build Example App runs-on: ${{ matrix.os }} timeout-minutes: 60 strategy: @@ -29,7 +29,7 @@ jobs: # TODO(Dennis): iOS builds aren't properly configured yet. Fix and # uncomment this exclusion # https://github.com/oddbit/flutter_facebook_app_events/actions/runs/3365684172/jobs/5581387481 - - platform: ios + - platform: ios steps: - uses: actions/checkout@v4 @@ -38,13 +38,9 @@ jobs: uses: subosito/flutter-action@v2 with: channel: "stable" + cache: true - - name: Cache packages - uses: actions/cache@v4 - with: - path: ${{ env.PUB_CACHE }} - key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }} - restore-keys: ${{ runner.os }}-pub- + - run: flutter --version - run: flutter pub get @@ -79,16 +75,24 @@ jobs: publish: name: Publish Plugin - if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest permissions: id-token: write needs: build_example steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 + + - uses: dart-lang/setup-dart@v1 + + - name: Set up Flutter + uses: subosito/flutter-action@v2 + with: + channel: "stable" + cache: true + + - run: flutter --version + + - run: flutter pub get - - uses: dart-lang/setup-dart@v1 - - - name: Publish package - run: dart pub publish --force - \ No newline at end of file + - name: Publish package + run: flutter pub publish --force