fix: Fixed gas fees regression associated with notifications (#64) #38
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 | |
on: | |
push: | |
branches: [main, ci/deploy-to-mainnet] | |
jobs: | |
deploy-widgets: | |
runs-on: ubuntu-latest | |
name: Deploy contract to mainnet | |
env: | |
NEAR_NETWORK_CONNECTION: mainnet | |
NEAR_GIGSBOARD_ACCOUNT_ID: ${{ vars.NEAR_GIGSBOARD_ACCOUNT_ID }} | |
NEAR_GIGSBOARD_ACCOUNT_PUBLIC_KEY: ${{ vars.NEAR_GIGSBOARD_ACCOUNT_PUBLIC_KEY }} | |
NEAR_GIGSBOARD_ACCOUNT_PRIVATE_KEY: ${{ secrets.NEAR_GIGSBOARD_ACCOUNT_PRIVATE_KEY }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: 1.68.2 | |
default: true | |
- uses: Swatinem/rust-cache@v1 | |
- run: rustup target add wasm32-unknown-unknown | |
- name: Build contract | |
run: ./build.sh | |
- name: Install near CLI | |
run: | | |
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/near-cli-rs/releases/download/v0.3.1/near-cli-rs-v0.3.1-installer.sh | sh | |
- name: Deploy contract | |
run: | | |
output=$(near contract call-function as-transaction "$NEAR_GIGSBOARD_ACCOUNT_ID" unsafe_self_upgrade file-args ./res/devgovgigs.wasm prepaid-gas '200 TeraGas' attached-deposit '0 NEAR' sign-as "$NEAR_GIGSBOARD_ACCOUNT_ID" network-config "$NEAR_NETWORK_CONNECTION" sign-with-plaintext-private-key --signer-public-key "$NEAR_GIGSBOARD_ACCOUNT_PUBLIC_KEY" --signer-private-key "$NEAR_GIGSBOARD_ACCOUNT_PRIVATE_KEY" send) | |
while [[ ! "$output" == *"Migration done."* ]]; do | |
echo "$output" | |
sleep 5 | |
output=$(near contract call-function as-transaction "$NEAR_GIGSBOARD_ACCOUNT_ID" unsafe_migrate json-args '{}' prepaid-gas '100 TeraGas' attached-deposit '0 NEAR' sign-as "$NEAR_GIGSBOARD_ACCOUNT_ID" network-config "$NEAR_NETWORK_CONNECTION" sign-with-plaintext-private-key --signer-public-key "$NEAR_GIGSBOARD_ACCOUNT_PUBLIC_KEY" --signer-private-key "$NEAR_GIGSBOARD_ACCOUNT_PRIVATE_KEY" send) | |
done | |
echo "$output" |