ci: implement release workflow for wasm application #21
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: Build and release | |
on: | |
push: | |
branches: | |
- master | |
- ci/app-wasm-release | |
jobs: | |
metadata: | |
name: Build and release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Build application | |
run: | | |
./logic/build.sh | |
- name: Get application metadata | |
id: get_app_metadata | |
run: | | |
echo "name=$(cargo read-manifest --manifest-path logic/Cargo.toml | jq -r '.name')" >> $GITHUB_OUTPUT | |
echo "description=$(cargo read-manifest --manifest-path logic/Cargo.toml | jq -r '.description')" >> $GITHUB_OUTPUT | |
echo "version=$(cargo read-manifest --manifest-path logic/Cargo.toml | jq -r '.version')" >> $GITHUB_OUTPUT | |
- name: Install near CLI | |
run: | | |
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/near-cli-rs/releases/download/v0.15.1/near-cli-rs-installer.sh | sh | |
- name: Release application | |
env: | |
NEAR_NETWORK: testnet | |
NEAR_CREDENTIALS_JSON: ${{ secrets.NEAR_TESTNET_CREDENTIALS_JSON }} | |
NEAR_CONTRACT_ACCOUNT_ID: "calimero-package-manager.testnet" | |
run: | | |
printf "$NEAR_CREDENTIALS_JSON" >> "./near-credentials.json" | |
./logic/release.sh \ | |
"$NEAR_NETWORK" \ | |
./near-credentials.json \ | |
"$NEAR_CONTRACT_ACCOUNT_ID" |