File tree Expand file tree Collapse file tree 6 files changed +65
-3
lines changed Expand file tree Collapse file tree 6 files changed +65
-3
lines changed Original file line number Diff line number Diff line change 1+ name : DeFi
2+ on :
3+ push :
4+ tags :
5+ - v*
6+
7+ concurrency :
8+ cancel-in-progress : true
9+ group : ${{ github.ref_name }}
10+
11+ jobs :
12+ abi-gen :
13+ name : " Generate and publish ABI"
14+ runs-on : ubuntu-latest
15+ environment : master
16+ steps :
17+ - uses : actions/checkout@v3
18+
19+ - name : Use Node.js
20+ uses : actions/setup-node@v3
21+ with :
22+ node-version : " 16.x"
23+ cache : " yarn"
24+ cache-dependency-path : contracts/yarn.lock
25+
26+ - run : yarn install --frozen-lockfile
27+ working-directory : ./contracts
28+
29+ - name : " Generate ABI files"
30+ run : (yarn run abi:generate) && (yarn run abi:dist)
31+ env :
32+ CONTRACT_SIZE : true
33+ working-directory : ./contracts
34+
35+ - name : Update version from tag
36+ working-directory : ./contracts/dist
37+ run : |
38+ VERSION="0.1.0"
39+ if [ "${{ env.GITHUB_REF_TYPE }}" = "tag" ]; then
40+ VERSION="${GITHUB_REF_NAME#v}"
41+ fi
42+
43+ echo "Version set to $VERSION"
44+ sed -i -e "s/RELEASE_VERSION/$VERSION/g" package.json
45+
46+ - name : " Publish"
47+ run : npm publish --access public
48+ working-directory : ./contracts/dist
49+ env :
50+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN_ORIGIN_DEFI }}
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ contracts/deployments/hardhat*
5858contracts /coverage /
5959contracts /coverage.json
6060contracts /build /
61+ contracts /dist /
6162dapp /network.json
6263dapp /keys /
6364dapp /ganache-network.json
Original file line number Diff line number Diff line change 1+ //registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}
2+ registry=https://registry.npmjs.org/
3+ always-auth=true
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " @origin/defi" ,
3+ "version" : " RELEASE_VERSION" ,
4+ "license" : " MIT" ,
5+ "homepage" : " https://github.com/originprotocol/origin-dollar" ,
6+ "engines" : {
7+ "node" : " 16"
8+ }
9+ }
Original file line number Diff line number Diff line change 88 "deploy:mainnet" : " (npx hardhat deploy --network mainnet --verbose --export '../dapp/network.mainnet.json') && yarn run copy-interface-artifacts" ,
99 "deploy:oeth" : " (rm -rf deployments/hardhat && npx hardhat deploy --export '../dapp-oeth/network.json') && yarn run copy-interface-artifacts:oeth" ,
1010 "deploy:oeth:mainnet" : " (npx hardhat deploy --network mainnet --verbose --export '../dapp-oeth/network.mainnet.json') && yarn run copy-interface-artifacts" ,
11+ "abi:generate" : " (rm -rf deployments/hardhat && mkdir -p dist/abi && npx hardhat deploy --export '../dist/network.json')" ,
12+ "abi:dist" : " find ./artifacts/contracts -name \" *.json\" -type f -exec cp {} ./dist/abi \\ ; && rm -rf dist/abi/*.dbg.json dist/abi/Mock*.json && cp ./abi.package.json dist/package.json && cp ./.npmrc.abi dist/.npmrc" ,
1113 "node" : " yarn run node:fork" ,
1214 "node:fork" : " ./node.sh fork" ,
1315 "lint" : " yarn run lint:js && yarn run lint:sol" ,
Original file line number Diff line number Diff line change 99 "build:oethdapp" : " (cd dapp-oeth && NODE_ENV=development yarn install && yarn build)" ,
1010 "start" : " bash devops/start-dapp.sh"
1111 },
12- "dependencies" : {
13- "react-use" : " ^17.4.0"
14- },
1512 "engines" : {
1613 "node" : " 16"
1714 }
You can’t perform that action at this time.
0 commit comments