Repository navigation
fix: update node version and remove npm self-install to fix broken ci #780
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 | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| env: | |
| BASE_RPC_URL: ${{ secrets.BASE_RPC_URL }} | |
| ZERO_EX_API_KEY: ${{ secrets.ZERO_EX_API_KEY }} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: 22 | |
| - name: copy env | |
| run: cp .env.default .env | |
| - name: install | |
| run: yarn | |
| - name: build | |
| run: yarn build | |
| test-integration-base: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: 22 | |
| - name: copy env | |
| run: cp .env.default .env | |
| - name: install | |
| run: yarn | |
| - name: chain | |
| run: yarn chain:fork:base & | |
| - name: test | |
| run: yarn test:integration:base | |
| publish: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.ref == 'refs/heads/master' }} | |
| needs: [build] | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| # Node 24 ships npm 11.x in-the-box, which already supports OIDC trusted | |
| # publishing + provenance. Avoids the fragile `npm install -g npm@latest` | |
| # self-upgrade dance (which can leave npm in an inconsistent state mid- | |
| # install — observed on Node 22.22.2 with `Cannot find module 'promise-retry'` | |
| # during reify). | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| registry-url: "https://registry.npmjs.org" | |
| - name: copy env | |
| run: cp .env.default .env | |
| - name: install | |
| run: yarn | |
| - name: prepublish | |
| run: yarn prepublishOnly | |
| - name: release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: npx semantic-release --branches master |