[cosmwasm] contracts release (#734)

* test release

* mv instead of rm

* remove todos

* add comment
This commit is contained in:
Dev Kalra 2023-03-31 19:13:30 +05:30 committed by GitHub
parent ccc2e33dee
commit 614d35e3a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 26 additions and 23 deletions

View File

@ -11,35 +11,38 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: target_chains/cosmwasm
working-directory: target_chains/cosmwasm/tools
steps:
- uses: actions/checkout@v2
- name: Build
- name: Setup tool
run: npm ci
- name: Build generic cosmwasm contract
run: |
bash ./build.sh
zip -r artifacts.zip artifacts
npm run build-contract -- --cosmwasm
mv ../artifacts ../cosmwasm
zip -r cosmwasm.zip ../cosmwasm
- name: Build injective cosmwasm contract
run: |
npm run build-contract -- --injective
mv ../artifacts ../injective
zip -r injective.zip ../injective
- name: Set env
run: |
PREFIX="refs/tags/pyth-cosmwasm-contract-"
echo "VERSION=${GITHUB_REF:${#PREFIX}}" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
# Setting VERSION in set env step and hence it will be available
release_name: Pyth Cosmwasm Contract ${{ env.VERSION }}
files: |
target_chains/cosmwasm/tools/cosmwasm.zip
target_chains/cosmwasm/tools/injective.zip
body: |
Contracts
- cosmwasm.zip contains the generic cosmwasm contract for most Cosmos SDK chains.
- injective.zip contains injectives specific contract.
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: target_chains/cosmwasm/artifacts.zip
asset_name: artifacts.zip
asset_content_type: application/zip
# Setting VERSION in set env step and hence it will be available
name: Pyth Cosmwasm Contract ${{ env.VERSION }}
tag_name: ${{ github.ref_name }}