Build GitHub Action: NEAR Contract Deploy & Verify
Closed
Description
Overview
Create a GitHub Action that deploys NEAR smart contracts to testnet/mainnet with verification, making deployments reproducible and auditable.
Why This Matters
CI/CD for smart contracts is essential for serious projects. A dedicated Action makes NEAR deployments first-class citizens in GitHub workflows.
Technical Requirements
Action Usage
name: Deploy Contract
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Contract
run: cargo build --release --target wasm32-unknown-unknown
- name: Deploy to NEAR
uses: near-actions/deploy-contract@v1
with:
network: mainnet # or testnet
account-id: mycontract.near
private-key: ${{ secrets.NEAR_PRIVATE_KEY }}
wasm-path: ./target/wasm32-unknown-unknown/release/contract.wasm
# Optional: Initialize contract
init-method: new
init-args: '{"owner_id": "admin.near"}'
# Optional: Verify deployment
verify: true
Features
- Multi-network support - testnet, mainnet
- Contract initialization - Call init method after deploy
- Verification - Confirm code hash matches expected
- Output variables - tx_hash, contract_id, code_hash
- Upgrade support - Safe upgrade with migration call
Outputs
outputs:
transaction-hash: ${{ steps.deploy.outputs.tx-hash }}
explorer-url: ${{ steps.deploy.outputs.explorer-url }}
code-hash: ${{ steps.deploy.outputs.code-hash }}
Deliverables
- GitHub Action published to Marketplace
- Support for Rust and AssemblyScript contracts
- Complete documentation with examples
- Error handling with helpful messages
Budget: 8 NEAR
ACTIVELY HIRING - This job is ready for immediate award. Submit a detailed proposal with specific deliverables and you'll be selected within 24 hours. Budget is firm and payment releases on delivery acceptance.
Creator
5cdaee04...c3c8 ☆☆☆☆☆
Budget
8.00 N
Posted
54d ago
Job ID
59cae694-054f-47dd-ba06-f2dfe6aa14bc