depsupdate2 #35
Workflow file for this run
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: Publish Check | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| publish_dry_run: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: dart:latest | |
| steps: | |
| - name: Configure Git for safe directory | |
| run: | | |
| git config --global --add safe.directory /__w/gql/gql | |
| git config --global --add safe.directory /__w/gql | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| # Set up branch with proper tracking for PRs | |
| - name: Setup branch for PR | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| # Create and checkout a new branch | |
| git checkout -b pr-branch | |
| # Set up tracking to the base branch | |
| git branch -u origin/${{ github.base_ref }} pr-branch | |
| # Fetch PR and merge it | |
| git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-temp | |
| git merge pr-temp | |
| # For non-PR runs (workflow_dispatch) | |
| - name: Setup branch for non-PR | |
| if: github.event_name != 'pull_request' | |
| run: | | |
| git checkout -b work-branch | |
| git branch -u origin/${{ github.ref_name }} work-branch | |
| - name: Setup Git user | |
| run: | | |
| git config --global user.name "GitHub Actions Bot" | |
| git config --global user.email "[email protected]" | |
| - name: Install Melos | |
| run: | | |
| echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH | |
| dart pub global activate melos && dart pub get | |
| - name: Bootstrap workspace | |
| run: melos bootstrap --no-flutter | |
| - name: Bump alpha versions | |
| run: melos run bump-alpha | |
| # Use environment variable to bypass version constraint errors during dry-run | |
| - name: Prepare environment for publish dry-run | |
| run: | | |
| echo "PUB_ENVIRONMENT=dart-pub-melos-publish-dry-run" >> $GITHUB_ENV | |
| # First publish order: core packages | |
| - name: Publish dry run for core packages | |
| run: | | |
| melos publish --dry-run --yes \ | |
| --scope="gql" \ | |
| --scope="gql_tristate_value" \ | |
| --scope="gql_code_builder_serializers" \ | |
| --scope="gql_code_builder" | |
| continue-on-error: true # We allow this to fail due to dependency constraints | |
| # Second publish order: execution packages | |
| - name: Publish dry run for execution packages | |
| run: | | |
| melos publish --dry-run --yes \ | |
| --scope="gql_exec" \ | |
| --scope="gql_link" | |
| continue-on-error: true # We allow this to fail due to dependency constraints | |
| # Third publish order: link implementation packages | |
| - name: Publish dry run for link implementation packages | |
| run: | | |
| melos publish --dry-run --yes \ | |
| --scope="gql_http_link" \ | |
| --scope="gql_dio_link" \ | |
| --scope="gql_websocket_link" \ | |
| --scope="gql_dedupe_link" \ | |
| --scope="gql_error_link" \ | |
| --scope="gql_transform_link" | |
| continue-on-error: true # We allow this to fail due to dependency constraints | |
| # Fourth publish order: build packages | |
| - name: Publish dry run for build packages | |
| run: | | |
| melos publish --dry-run --yes \ | |
| --scope="gql_build" | |
| continue-on-error: true # We allow this to fail due to dependency constraints |