|
|
@@ -0,0 +1,45 @@
|
|
|
+name: Release Pyth Cosmwasm Contract
|
|
|
+
|
|
|
+on:
|
|
|
+ push:
|
|
|
+ tags:
|
|
|
+ - pyth-cosmwasm-contract-v*
|
|
|
+
|
|
|
+jobs:
|
|
|
+ release-contract:
|
|
|
+ name: Build and Release cosmwasm contract
|
|
|
+ runs-on: ubuntu-latest
|
|
|
+ defaults:
|
|
|
+ run:
|
|
|
+ working-directory: target_chains/cosmwasm
|
|
|
+ steps:
|
|
|
+ - uses: actions/checkout@v2
|
|
|
+ - name: Build
|
|
|
+ run: |
|
|
|
+ bash ./build.sh
|
|
|
+ zip -r artifacts.zip artifacts
|
|
|
+ - 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 }}
|
|
|
+ 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 }}
|
|
|
+ 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
|