Skip to content

Commit

Permalink
chore: add build script
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksuss committed Dec 2, 2024
1 parent 42ef90d commit 2049c4c
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'

name: Build
jobs:
build:
name: Build contracts
runs-on: github-hosted-heavy-runner
steps:
- name: Install Dependencies
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: libudev-dev
version: 1.0
- name: Clone the repository
uses: actions/checkout@v4
- name: Install plugins
run: cargo install cargo-make cargo-near
- name: Compile contract
run: cargo make build
- run: ls -lH res/aurora-*contract*.wasm
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: contracts
path: res/aurora-controller*.wasm

publish:
name: Publish contracts
runs-on: github-hosted-heavy-runner
needs: build
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
- run: ls -la contracts
- name: Publish contracts for ${{ github.ref }} release
uses: svenstaro/upload-release-action@v2
with:
tag: ${{ github.ref }}
file: contracts/aurora-controller*.wasm
repo_token: ${{ secrets.GITHUB_TOKEN }}
file_glob: true
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0

0 comments on commit 2049c4c

Please sign in to comment.