feat(chains): add OP Stack config to Whitechain Sepolia (#5055) #3589
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: Changesets | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| permissions: {} # each job should declare only the permissions it needs | |
| jobs: | |
| verify: | |
| name: Verify | |
| uses: ./.github/workflows/verify.yml | |
| secrets: inherit | |
| permissions: | |
| contents: read # checkout repository contents in the reusable workflow | |
| report-wagmi-failures: | |
| name: Report Wagmi failures | |
| needs: verify | |
| if: ${{ !cancelled() && github.repository_owner == 'wevm' && github.ref == 'refs/heads/main' }} | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| timeout-minutes: 5 | |
| permissions: | |
| actions: read # inspect jobs from this workflow run | |
| issues: write # create or update the tracking issue | |
| steps: | |
| - name: Report failures | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
| run: | | |
| failed_jobs="$( | |
| gh api --paginate \ | |
| "repos/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID/jobs?per_page=100" \ | |
| --jq '.jobs[] | select(.name | startswith("Verify / Wagmi")) | select(.conclusion == "failure" or .conclusion == "timed_out" or ([.steps[]?.conclusion] | index("failure"))) | [.name, .html_url] | @tsv' | |
| )" | |
| if [[ -z "$failed_jobs" ]]; then | |
| exit 0 | |
| fi | |
| title='ci: wagmi compatibility checks failing' | |
| { | |
| echo '<!-- wagmi-ci-failures -->' | |
| echo "Wagmi compatibility checks are failing on \`main\`." | |
| echo | |
| echo "Run: [$GITHUB_RUN_ID]($RUN_URL)" | |
| echo "Commit: \`$GITHUB_SHA\`" | |
| echo | |
| echo 'Failed jobs:' | |
| while IFS=$'\t' read -r name url; do | |
| echo "- [$name]($url)" | |
| done <<< "$failed_jobs" | |
| } > "$RUNNER_TEMP/wagmi-failure.md" | |
| issue_number="$( | |
| gh api --paginate --slurp \ | |
| "repos/$GITHUB_REPOSITORY/issues?state=open&labels=github_actions&per_page=100" | | |
| jq -r '[.[][] | select(.pull_request == null) | select(.body != null and (.body | contains("<!-- wagmi-ci-failures -->")))][0].number // empty' | |
| )" | |
| if [[ -n "$issue_number" ]]; then | |
| gh issue comment "$issue_number" \ | |
| --repo "$GITHUB_REPOSITORY" \ | |
| --body-file "$RUNNER_TEMP/wagmi-failure.md" | |
| else | |
| gh issue create \ | |
| --repo "$GITHUB_REPOSITORY" \ | |
| --title "$title" \ | |
| --body-file "$RUNNER_TEMP/wagmi-failure.md" \ | |
| --label 'A: CI' \ | |
| --label 'T: Bug' \ | |
| --label github_actions | |
| fi | |
| changesets: | |
| name: Create version pull request | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| outputs: | |
| hasChangesets: ${{ steps.changesets.outputs.hasChangesets }} | |
| permissions: | |
| contents: write # commit version/changelog updates to the release pull request | |
| pull-requests: write # create or update the Changesets release pull request | |
| steps: | |
| - name: Clone repository | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| with: | |
| # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits | |
| fetch-depth: 0 | |
| submodules: 'recursive' | |
| - name: Install dependencies | |
| uses: ./.github/actions/install-dependencies | |
| with: | |
| skip-cache: true # avoid cache poisoning attacks | |
| - name: Create Version Pull Request | |
| id: changesets | |
| uses: changesets/action@06245a4e0a36c064a573d4150030f5ec548e4fcc | |
| with: | |
| commit: 'chore: version package' | |
| title: 'chore: version package' | |
| version: pnpm changeset:version | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| release: | |
| name: Release | |
| if: needs.changesets.outputs.hasChangesets == 'false' | |
| needs: [verify, changesets] | |
| runs-on: ubuntu-latest | |
| # TODO: Add `environment: npm` after configuring the npm environment with required reviewers. | |
| timeout-minutes: 5 | |
| outputs: | |
| published: ${{ steps.changesets.outputs.published }} | |
| permissions: | |
| contents: write # create GitHub releases and tags after npm publish | |
| id-token: write # authenticate to npm via trusted publishing | |
| steps: | |
| - name: Clone repository | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| with: | |
| submodules: 'recursive' | |
| - name: Install dependencies | |
| uses: ./.github/actions/install-dependencies | |
| with: | |
| skip-cache: true # avoid cache poisoning attacks | |
| - name: Publish to NPM | |
| id: changesets | |
| uses: changesets/action@06245a4e0a36c064a573d4150030f5ec548e4fcc | |
| with: | |
| createGithubReleases: true | |
| publish: pnpm changeset:publish | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |