diff --git a/.DS_Store b/.DS_Store index c582d2f..a37103b 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.github/workflows/contract.yml b/.github/workflows/contract.yml index 3de93f1..6cd729f 100644 --- a/.github/workflows/contract.yml +++ b/.github/workflows/contract.yml @@ -44,3 +44,34 @@ jobs: - name: Run tests run: cargo test -r --all -- --ignored + + - name: Build for WASM + run: cargo build --release --target wasm32-unknown-unknown + + - name: Collect artifacts + run: | + mkdir -p artifacts + cp target/wasm32-unknown-unknown/release/*.wasm artifacts/ + cp target/wasm32-unknown-unknown/release/*.idl artifacts/ + + - name: Upload build artifacts + uses: actions/upload-artifact@v3 + with: + name: build-artifacts + path: artifacts/* + + - name: Publish artifacts to GitHub Packages + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo "Publishing artifacts to GitHub Packages" + mkdir -p packages + for file in artifacts/*; do + filename=$(basename "$file") + curl -u "${{ secrets.GITHUB_ACTOR }}:${{ secrets.GITHUB_TOKEN }}" \ + -X POST \ + -H "Content-Type: application/octet-stream" \ + --data-binary @"$file" \ + https://api.github.com/repos/${{ github.repository }}/packages \ + -H "Accept: application/vnd.github.v3+json" + done diff --git a/extended-vft/app/src/services/extended_vft/mod.rs b/extended-vft/app/src/services/extended_vft/mod.rs index 6adc23b..f0d2fdb 100644 --- a/extended-vft/app/src/services/extended_vft/mod.rs +++ b/extended-vft/app/src/services/extended_vft/mod.rs @@ -1,3 +1,4 @@ +#![allow(static_mut_refs)] use gstd::msg; use sails_rs::{collections::HashSet, gstd::service, prelude::*}; mod funcs; diff --git a/extended-vmt/app/src/services/extended_vmt/mod.rs b/extended-vmt/app/src/services/extended_vmt/mod.rs index 942503c..ce6b78f 100644 --- a/extended-vmt/app/src/services/extended_vmt/mod.rs +++ b/extended-vmt/app/src/services/extended_vmt/mod.rs @@ -1,3 +1,4 @@ +#![allow(static_mut_refs)] use gstd::msg; use sails_rs::{ collections::{HashMap, HashSet}, diff --git a/extended-vnft/app/src/services/extended_vnft/mod.rs b/extended-vnft/app/src/services/extended_vnft/mod.rs index df1572e..ea63733 100644 --- a/extended-vnft/app/src/services/extended_vnft/mod.rs +++ b/extended-vnft/app/src/services/extended_vnft/mod.rs @@ -1,3 +1,4 @@ +#![allow(static_mut_refs)] use gstd::msg; use sails_rs::{ collections::{HashMap, HashSet}, diff --git a/vft-service/src/lib.rs b/vft-service/src/lib.rs index f90df85..8b8100a 100644 --- a/vft-service/src/lib.rs +++ b/vft-service/src/lib.rs @@ -1,6 +1,7 @@ #![no_std] #![allow(clippy::new_without_default)] #![allow(unused_imports)] +#![allow(static_mut_refs)] use core::fmt::Debug; use sails_rs::{ collections::HashMap, diff --git a/vmt-service/src/lib.rs b/vmt-service/src/lib.rs index 61120b1..f75f964 100644 --- a/vmt-service/src/lib.rs +++ b/vmt-service/src/lib.rs @@ -1,5 +1,6 @@ #![no_std] #![allow(clippy::new_without_default)] +#![allow(static_mut_refs)] use crate::utils::*; use core::fmt::Debug; use sails_rs::{ diff --git a/vnft-service/src/lib.rs b/vnft-service/src/lib.rs index 7d08c2d..5983437 100644 --- a/vnft-service/src/lib.rs +++ b/vnft-service/src/lib.rs @@ -1,5 +1,6 @@ #![no_std] #![allow(clippy::new_without_default)] +#![allow(static_mut_refs)] use crate::utils::*; use core::fmt::Debug; use sails_rs::{