workflow: Fix Ethers V6 publish regex #49
Workflow file for this run
This file contains 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: | |
pull_request | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: 8 | |
run_install: true | |
- name: Build JS client | |
working-directory: clients/js | |
run: pnpm build | |
- name: Build ethers-v6 integration | |
working-directory: integrations/ethers-v6 | |
run: pnpm build | |
- name: Build hardhat integration | |
working-directory: integrations/hardhat | |
run: pnpm build | |
- name: Build Viem integration | |
working-directory: integrations/viem-v2 | |
run: pnpm build | |
- name: Build Wagmi integration | |
working-directory: integrations/wagmi-v2 | |
run: pnpm build | |
- name: Extract package from tag | |
id: extract-tag | |
env: | |
# There's no support for escaping this for use in a shell command. | |
# GitHub's recommendation is to pass it through the environment. | |
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable | |
REF_NAME: 'integrations/ethers-v6/v6.0.0-alpha.0' | |
run: | | |
echo "NPM_PACKAGE=$(echo 'integrations/ethers-v6/v6.0.0-alpha.0' | grep -oE '(clients/js|contracts|integrations/(hardhat|wagmi-v2|viem-v2))')" >> $GITHUB_OUTPUT | |
- name: Publish integrations/ethers-v6/v6.0.0-alpha.0 to NPM | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
# Build runs as a prepublish script | |
ignore-scripts: false | |
token: ${{ secrets.NPM_TOKEN }} | |
package: ${{ steps.extract-tag.outputs.NPM_PACKAGE }} | |
access: public |