fix(deps): update dependency zod to v4 #4444
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: Workflow | |
| on: | |
| # Run on pushes to main.. | |
| push: | |
| branches: | |
| - main | |
| # ..and any pull request. | |
| pull_request: | |
| # Cancel any in progress run of the workflow for a given PR | |
| # This avoids building outdated code | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| check-for-sh: | |
| name: Check for .sh | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - run: "echo '*** Do not write .sh scripts! ***'; ! find . -type f -name '*.sh' | grep ." | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version-file: 'package.json' | |
| check-latest: true | |
| - run: yarn | |
| - run: yarn compile | |
| - run: yarn typecheck | |
| - run: yarn format:check | |
| - run: yarn lint | |
| - run: yarn solhint | |
| docs: | |
| name: Docs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0 | |
| with: | |
| project_id: celo-mobile-mainnet | |
| credentials_json: ${{ secrets.MAINNET_SERVICE_ACCOUNT_KEY }} | |
| - name: Google Secrets | |
| id: google-secrets | |
| uses: google-github-actions/get-secretmanager-secrets@bc9c54b29fdffb8a47776820a7d26e77b379d262 # v3.0.0 | |
| with: | |
| secrets: |- | |
| DIVVI_BOT_TOKEN:celo-mobile-mainnet/DIVVI_BOT_TOKEN | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| token: ${{ steps.google-secrets.outputs.DIVVI_BOT_TOKEN }} | |
| # See https://github.com/actions/checkout?tab=readme-ov-file#push-a-commit-to-a-pr-using-the-built-in-token | |
| ref: ${{ github.head_ref || github.ref }} | |
| - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version-file: 'package.json' | |
| check-latest: true | |
| - run: yarn | |
| - run: yarn compile | |
| - run: yarn docs | |
| - name: Check for documentation changes | |
| id: docs-changes | |
| run: | | |
| if [ -n "$(git status --porcelain docs/)" ]; then | |
| echo "changes=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "changes=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Commit documentation updates | |
| if: "${{ steps.docs-changes.outputs.changes == 'true' && github.event_name == 'pull_request' && !startsWith(github.event.head_commit.message, 'docs: auto-update') }}" | |
| run: | | |
| git config user.name "Divvi Bot" | |
| git config user.email "[email protected]" | |
| git add docs/ | |
| git commit -m "docs: auto-update" | |
| git push | |
| knip: | |
| name: Knip | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version-file: 'package.json' | |
| check-latest: true | |
| - run: yarn | |
| - run: yarn knip | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version-file: 'package.json' | |
| check-latest: true | |
| - run: yarn | |
| - run: yarn test | |
| # - name: Upload Coverage Report | |
| # uses: actions/upload-artifact@v3 | |
| # with: | |
| # path: coverage/lcov-report | |
| # - name: 'Upload coverage to Codecov' | |
| # uses: codecov/codecov-action@v3 | |
| deploy-production: | |
| name: Deploy production | |
| if: github.ref == 'refs/heads/main' | |
| needs: | |
| - lint | |
| - test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0 | |
| with: | |
| project_id: divvi-production | |
| credentials_json: ${{ secrets.DIVVI_PRODUCTION_SERVICE_ACCOUNT_KEY }} | |
| - uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3.0.1 | |
| - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version-file: 'package.json' | |
| check-latest: true | |
| - uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 | |
| with: | |
| path: | | |
| node_modules | |
| */*/node_modules | |
| key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | |
| - run: yarn | |
| - name: Deploy rewardDivviEthCc2025IntegrationV1 | |
| run: | | |
| yarn deploy:production:internal-single rewardDivviEthCc2025IntegrationV1 \ | |
| --env-vars-file=cloud-functions/endpoints/rewardDivviEthCc2025IntegrationV1/config-production.yaml \ | |
| --set-secrets REWARD_POOL_OWNER_PRIVATE_KEY=ETHCC2025_REWARD_POOL_OWNER_PRIVATE_KEY:latest | |
| - name: Deploy updateDivviEntities | |
| run: | | |
| yarn deploy:production:internal-single updateDivviEntities \ | |
| --env-vars-file=cloud-functions/endpoints/updateDivviEntities/config-production.yaml \ | |
| --set-secrets GOOGLE_SERVICE_ACCOUNT_JSON=BUILDER_INFO_SERVICE_ACCOUNT_JSON:latest \ | |
| --set-secrets BUILDER_INFO_GOOGLE_SHEET_ID=BUILDER_INFO_GOOGLE_SHEET_ID:latest \ | |
| --memory=512MiB |