Skip to content

Commit

Permalink
Use release tags
Browse files Browse the repository at this point in the history
  • Loading branch information
shahthepro committed Aug 4, 2023
1 parent 9e2ff4c commit 14a53aa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/abi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ name: DeFi
on:
push:
branches:
- 'master'
# - 'master'
# TODO: Remove before merging
- 'shah/abi-gh-action'
tags:
- v*
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -33,7 +35,18 @@ jobs:
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
Expand Down
1 change: 1 addition & 0 deletions contracts/abi.package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@origin/defi",
"version": "RELEASE_VERSION",
"license": "MIT",
"homepage": "https://github.com/originprotocol/origin-dollar",
"engines": {
Expand Down

0 comments on commit 14a53aa

Please sign in to comment.