-
Notifications
You must be signed in to change notification settings - Fork 29
51 lines (49 loc) · 1.8 KB
/
publish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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