release-pyth-cosmwasm-contract.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. name: Release Pyth Cosmwasm Contract
  2. on:
  3. push:
  4. tags:
  5. - pyth-cosmwasm-contract-v*
  6. jobs:
  7. release-contract:
  8. name: Build and Release cosmwasm contract
  9. runs-on: ubuntu-latest
  10. defaults:
  11. run:
  12. working-directory: target_chains/cosmwasm/tools
  13. steps:
  14. - uses: actions/checkout@v2
  15. - name: Setup tool
  16. run: npm ci
  17. - name: Build generic cosmwasm contract
  18. run: |
  19. npm run build-contract -- --cosmwasm
  20. mv ../artifacts ../cosmwasm
  21. zip -r cosmwasm.zip ../cosmwasm
  22. - name: Build injective cosmwasm contract
  23. run: |
  24. npm run build-contract -- --injective
  25. mv ../artifacts ../injective
  26. zip -r injective.zip ../injective
  27. - name: Build osmosis cosmwasm contract
  28. run: |
  29. npm run build-contract -- --osmosis
  30. mv ../artifacts ../osmosis
  31. zip -r osmosis.zip ../osmosis
  32. - name: Set env
  33. run: |
  34. PREFIX="refs/tags/pyth-cosmwasm-contract-"
  35. echo "VERSION=${GITHUB_REF:${#PREFIX}}" >> $GITHUB_ENV
  36. - name: Release
  37. uses: softprops/action-gh-release@v1
  38. with:
  39. files: |
  40. target_chains/cosmwasm/tools/cosmwasm.zip
  41. target_chains/cosmwasm/tools/injective.zip
  42. target_chains/cosmwasm/tools/osmosis.zip
  43. body: |
  44. Contracts
  45. - cosmwasm.zip contains the generic cosmwasm contract for most Cosmos SDK chains.
  46. - injective.zip contains injective specific contract.
  47. - osmosis.zip contains osmosis specific contract.
  48. draft: false
  49. # Setting VERSION in set env step and hence it will be available
  50. name: Pyth Cosmwasm Contract ${{ env.VERSION }}
  51. tag_name: ${{ github.ref_name }}