Skip to content

Commit

Permalink
feat: add solidity workflow and fix js workflow (#198)
Browse files Browse the repository at this point in the history
* fix: update sdk scripts to use plain npm

* fix: set registry

* add solidity workflow
  • Loading branch information
m30m authored Oct 29, 2024
1 parent 4fbfa7b commit 839e343
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/publish-js-sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version-file: "package.json"
registry-url: "https://registry.npmjs.org"

- name: Install dependencies
run: npm install
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/publish-solidity-sdk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Publish Express Relay Solidity SDK

on:
push:
tags:
- "solidity-v*"
jobs:
publish-solidity:
name: Publish Solidity SDK Package to NPM
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- uses: actions/setup-node@v4
with:
node-version-file: "package.json"
registry-url: "https://registry.npmjs.org"

- name: Install Foundry
uses: foundry-rs/[email protected]
with:
version: nightly

- name: Install dependencies
run: npm install
working-directory: sdk/solidity/

- name: Generate ABIs
run: npm run generate-abi
working-directory: sdk/solidity/

- name: Check ABIs
run: npm run check-abi
working-directory: sdk/solidity/

- name: Publish to npm
run: npm publish
working-directory: sdk/solidity/
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
12 changes: 6 additions & 6 deletions sdk/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
"scripts": {
"build": "tsc",
"test": "jest src/ --passWithNoTests",
"simple-searcher-evm": "pnpm run build && node lib/examples/simpleSearcherEvm.js",
"simple-searcher-svm": "pnpm run build && node lib/examples/simpleSearcherSvm.js",
"simple-searcher-limo": "pnpm run build && node lib/examples/simpleSearcherLimo.js",
"simple-searcher-evm": "npm run build && node lib/examples/simpleSearcherEvm.js",
"simple-searcher-svm": "npm run build && node lib/examples/simpleSearcherSvm.js",
"simple-searcher-limo": "npm run build && node lib/examples/simpleSearcherLimo.js",
"generate-api-types": "openapi-typescript http://127.0.0.1:9000/docs/openapi.json --output src/serverTypes.d.ts",
"generate-anchor-types": "anchor idl type src/idl/idlExpressRelay.json --out src/expressRelayTypes.d.ts && anchor idl type src/examples/idl/idlDummy.json --out src/examples/dummyTypes.d.ts",
"format": "prettier --write \"src/**/*.ts\"",
"lint": "eslint src",
"prepublishOnly": "pnpm run build && pnpm test && pnpm run lint",
"preversion": "pnpm run lint",
"version": "pnpm run format && git add -A src"
"prepublishOnly": "npm run build && npm test && npm run lint",
"preversion": "npm run lint",
"version": "npm run format && git add -A src"
},
"keywords": [
"pyth",
Expand Down

0 comments on commit 839e343

Please sign in to comment.