update dependencies for release pipeline #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release example contracts | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
pull_request: | |
branches: [ main ] | |
jobs: | |
buildexamplecontracts: | |
name: Build example contracts | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
./.devcontainer/install-dependencies.sh | |
- name: Build example contracts | |
run: | | |
(cd examples/nft && ./build.sh) | |
(cd examples/minimumweb4 && ./build.sh) | |
(cd examples/fungibletoken && ./build.sh) | |
- name: Package WASM files into a ZIP | |
run: | | |
mkdir -p release | |
zip -j release/example_contracts.zip examples/nft/out/nft.wasm examples/minimumweb4/out/minimum_web4.wasm examples/fungibletoken/out/fungible_token.wasm | |
- name: Upload WASM ZIP artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wasm-zip | |
path: release/example_contracts.zip | |
release: | |
name: Create Release | |
needs: buildexamplecontracts | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Download WASM ZIP artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: wasm-zip | |
- name: Create GitHub Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false | |
- name: Upload ZIP file to Release | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./example_contracts.zip | |
asset_name: example_contracts.zip | |
asset_content_type: application/zip |