Skip to content

Commit

Permalink
Update dictionary submodule, add test and publish pipelines for viem
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytrotkk committed Dec 16, 2024
1 parent dd15659 commit 7eb55c6
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 1 deletion.
52 changes: 52 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,58 @@ jobs:
with:
tag: typescript-ethers-v6-${{ env.VERSION }}
prerelease: ${{ env.PRERELEASE }}

viem:
runs-on: ubuntu-latest

needs:
typescript

defaults:
run:
working-directory: typescript/viem

steps:
- uses: actions/checkout@v3

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install base project
run: |
yarn ../base
yarn ../base compile
- name: Install project
run: yarn

- name: Compile typescript
run: yarn compile

- name: Determine version
run: |
export BRANCH=${GITHUB_REF##*/}
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
echo "Branch $BRANCH"
export VERSION=$(CURRENT=true bash ../scripts/calculate_version.sh)
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "Version $VERSION"
( test $BRANCH = "stable" && export PRERELEASE=false ) || export PRERELEASE=true
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
- name: Publish NPM package
run: ./scripts/publish_package.sh
env:
BRANCH: ${{ env.BRANCH }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Create Release
uses: ncipollo/release-action@v1
with:
tag: typescript-viem-${{ env.VERSION }}
prerelease: ${{ env.PRERELEASE }}

python:
runs-on: ubuntu-latest
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,36 @@ jobs:

- name: Run static checks
run: yarn fullCheck

viem:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18, 20, 22]

defaults:
run:
working-directory: typescript/viem

steps:
- uses: actions/checkout@v3

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install base project
run: |
yarn ../base
yarn ../base compile
- name: Install project
run: yarn

- name: Run static checks
run: yarn fullCheck

python:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion dictionary
Submodule dictionary updated 1 files
+1 −0 libraries.txt
1 change: 1 addition & 0 deletions typescript/viem/src/viemAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export class ViemAdapter implements Adapter<ViemContract> {
return BigInt(chainId);
}

// eslint-disable-next-line class-methods-use-this
isAddress(value: string): boolean {
return isAddress(value);
}
Expand Down

0 comments on commit 7eb55c6

Please sign in to comment.