ci: setup proper dart version #46
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: release-please | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| release-please: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Generate a token | |
| id: generate-token | |
| uses: actions/create-github-app-token@v3 | |
| with: | |
| app-id: ${{ secrets.CI_GITHUB_APP_APP_ID }} | |
| private-key: ${{ secrets.CI_GITHUB_APP_SECRET }} | |
| - uses: googleapis/release-please-action@v5 | |
| id: release | |
| with: | |
| token: ${{ steps.generate-token.outputs.token }} | |
| release-type: dart | |
| - uses: actions/checkout@v6 | |
| if: ${{ steps.release.outputs.prs_created }} | |
| with: | |
| ref: ${{ fromJSON(steps.release.outputs.pr).headBranchName }} | |
| - uses: dart-lang/setup-dart@v1 | |
| if: ${{ steps.release.outputs.prs_created }} | |
| with: | |
| sdk: "3.11.0" | |
| - name: 📦 Install Dependencies | |
| if: ${{ steps.release.outputs.prs_created }} | |
| run: | | |
| dart pub get | |
| - name: Run Build and Tests | |
| if: ${{ steps.release.outputs.prs_created }} | |
| run: | | |
| dart run build_runner build --delete-conflicting-outputs | |
| - name: Commit and push changes (build runner) | |
| uses: devops-infra/action-commit-push@master | |
| if: ${{ steps.release.outputs.prs_created }} | |
| with: | |
| github_token: "${{ steps.generate-token.outputs.token }}" | |
| add_timestamp: true | |
| commit_prefix: "chore: " | |
| commit_message: "run build_runner build" | |
| force: false | |
| target_branch: ${{ fromJSON(steps.release.outputs.pr).headBranchName }} |