release(google_vision): v2.2.1 #67
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
| # This workflow uses actions that are not certified by GitHub. | |
| # They are provided by a third-party and are governed by | |
| # separate terms of service, privacy policy, and support | |
| # documentation. | |
| name: Dart | |
| on: | |
| push: | |
| branches: [main] | |
| tags: | |
| - 'google_vision_js-v*' | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| pana: | |
| uses: ./.github/workflows/pana-dart.yaml | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # - uses: hoang-rio/set-timezone@v1.4 | |
| # with: | |
| # timezoneLinux: "America/Toronto" | |
| # Flutter SDK is required even for Dart-only packages because | |
| # workspace resolution (resolution: workspace) resolves all | |
| # workspace members, including google_vision_flutter. | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| - name: Install dependencies | |
| working-directory: ./packages/google_vision | |
| run: flutter pub get | |
| # Uncomment this step to verify the use of 'dart format' on each commit. | |
| - name: Verify formatting | |
| working-directory: ./packages/google_vision | |
| run: dart format --output=none --set-exit-if-changed . | |
| # Consider passing '--fatal-infos' for slightly stricter analysis. | |
| - name: Analyze project source | |
| working-directory: ./packages/google_vision | |
| run: dart analyze . | |
| google_vision_js: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dart-lang/setup-dart@v1 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| - name: Install npm deps | |
| working-directory: packages/google_vision_js | |
| run: npm install | |
| - name: Build (dart2js + tsup) | |
| working-directory: packages/google_vision_js | |
| run: npm run build | |
| publish-google-vision-js: | |
| needs: [google_vision_js] | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/google_vision_js-v') | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dart-lang/setup-dart@v1 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install npm deps | |
| working-directory: packages/google_vision_js | |
| run: npm install | |
| - name: Build (dart2js + tsup) | |
| working-directory: packages/google_vision_js | |
| run: npm run build | |
| - name: Publish to npm | |
| working-directory: packages/google_vision_js | |
| run: npm publish --access=public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |