[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 runs-on: ubuntu-latest
defaults: defaults:
run: run:
working-directory: target_chains/cosmwasm working-directory: target_chains/cosmwasm/tools
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Build - name: Setup tool
run: npm ci
- name: Build generic cosmwasm contract
run: | run: |
bash ./build.sh npm run build-contract -- --cosmwasm
zip -r artifacts.zip artifacts 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 - name: Set env
run: | run: |
PREFIX="refs/tags/pyth-cosmwasm-contract-" PREFIX="refs/tags/pyth-cosmwasm-contract-"
echo "VERSION=${GITHUB_REF:${#PREFIX}}" >> $GITHUB_ENV echo "VERSION=${GITHUB_REF:${#PREFIX}}" >> $GITHUB_ENV
- name: Create Release
id: create_release - name: Release
uses: actions/create-release@v1 uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
tag_name: ${{ github.ref_name }} files: |
# Setting VERSION in set env step and hence it will be available target_chains/cosmwasm/tools/cosmwasm.zip
release_name: Pyth Cosmwasm Contract ${{ env.VERSION }} 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 draft: false
prerelease: false # Setting VERSION in set env step and hence it will be available
- name: Upload Release Asset name: Pyth Cosmwasm Contract ${{ env.VERSION }}
id: upload-release-asset tag_name: ${{ github.ref_name }}
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