chore: release v1.0.4 #5
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 SDK | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| test: | |
| name: Forge Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: foundry-rs/foundry-toolchain@v1 | |
| - run: forge build | |
| - run: forge test -vvv | |
| publish: | |
| name: Publish to npm | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: foundry-rs/foundry-toolchain@v1 | |
| - uses: oven-sh/setup-bun@v2 | |
| - name: Forge build | |
| run: forge build | |
| - name: Install SDK deps | |
| run: cd sdk && bun install --frozen-lockfile | |
| - name: Lint SDK | |
| run: cd sdk && bun run lint | |
| - name: Build SDK | |
| run: cd sdk && bun run build | |
| - name: Test SDK | |
| run: cd sdk && bun test | |
| - name: Publish to npm | |
| run: | | |
| echo "//registry.npmjs.org/:_authToken=\${NODE_AUTH_TOKEN}" > sdk/.npmrc | |
| cd sdk && npm publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Create GitHub Release | |
| run: gh release create "$GITHUB_REF_NAME" --generate-notes | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |