-
Notifications
You must be signed in to change notification settings - Fork 93
Add ABI generation to CI #1706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add ABI generation to CI #1706
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
acafb7c
Add ABI generation to CI
shahthepro ba693fa
Move to package.json
shahthepro db80255
Tweak commands
shahthepro 567dd8c
Update script
shahthepro dedcfbc
Update dir structure
shahthepro c32dfe8
Add separate package.json for the ABIs
shahthepro 9e2ff4c
Add NPM token
shahthepro 14a53aa
Use release tags
shahthepro e70d803
Use master environment
shahthepro 818e4a5
Add npmrc
shahthepro ce07bb7
Rename npmrc
shahthepro 46c739d
Prepare for merge
shahthepro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| name: DeFi | ||
| on: | ||
| push: | ||
| tags: | ||
| - v* | ||
|
|
||
| concurrency: | ||
| cancel-in-progress: true | ||
| group: ${{ github.ref_name }} | ||
|
|
||
| jobs: | ||
| abi-gen: | ||
| name: "Generate and publish ABI" | ||
| runs-on: ubuntu-latest | ||
| environment: master | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
|
|
||
| - name: Use Node.js | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: "16.x" | ||
| cache: "yarn" | ||
| cache-dependency-path: contracts/yarn.lock | ||
|
|
||
| - run: yarn install --frozen-lockfile | ||
| working-directory: ./contracts | ||
|
|
||
| - name: "Generate ABI files" | ||
| run: (yarn run abi:generate) && (yarn run abi:dist) | ||
| env: | ||
| CONTRACT_SIZE: true | ||
| working-directory: ./contracts | ||
|
|
||
| - name: Update version from tag | ||
| working-directory: ./contracts/dist | ||
| run: | | ||
| VERSION="0.1.0" | ||
| if [ "${{ env.GITHUB_REF_TYPE }}" = "tag" ]; then | ||
| VERSION="${GITHUB_REF_NAME#v}" | ||
| fi | ||
|
|
||
| echo "Version set to $VERSION" | ||
| sed -i -e "s/RELEASE_VERSION/$VERSION/g" package.json | ||
|
|
||
| - name: "Publish" | ||
| run: npm publish --access public | ||
| working-directory: ./contracts/dist | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_ORIGIN_DEFI }} |
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| //registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} | ||
| registry=https://registry.npmjs.org/ | ||
| always-auth=true |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "name": "@origin/defi", | ||
| "version": "RELEASE_VERSION", | ||
| "license": "MIT", | ||
| "homepage": "https://github.com/originprotocol/origin-dollar", | ||
| "engines": { | ||
| "node": "16" | ||
| } | ||
| } | ||
This file contains hidden or 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
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.