feat: migration to cargo near (#184) #36
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
on: | |
push: | |
branches: [ main, develop ] | |
workflow_dispatch: | |
name: Update Contracts | |
jobs: | |
update-contracts: | |
runs-on: ubuntu-latest | |
name: Update Contracts | |
permissions: | |
contents: write | |
steps: | |
- name: Clone the repository | |
uses: actions/checkout@v3 | |
- name: Install cargo-near | |
run: | | |
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/cargo-near/releases/latest/download/cargo-near-installer.sh | sh | |
- name: Build NEAR contracts | |
run: | | |
make rust-build-near | |
timeout-minutes: 60 | |
- name: Archive built WASM files | |
run: | | |
mkdir -p artifacts | |
find ./near/target/near -name "*.wasm" -exec cp {} artifacts/ \; | |
zip -j contracts.zip artifacts/*.wasm | |
shell: bash | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: ${{ github.sha }} | |
files: contracts.zip |