Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading workflow: Publish artifacts to GitHub Packages #38

Merged
merged 2 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
31 changes: 31 additions & 0 deletions .github/workflows/contract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions extended-vft/app/src/services/extended_vft/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(static_mut_refs)]
use gstd::msg;
use sails_rs::{collections::HashSet, gstd::service, prelude::*};
mod funcs;
Expand Down
1 change: 1 addition & 0 deletions extended-vmt/app/src/services/extended_vmt/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(static_mut_refs)]
use gstd::msg;
use sails_rs::{
collections::{HashMap, HashSet},
Expand Down
1 change: 1 addition & 0 deletions extended-vnft/app/src/services/extended_vnft/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(static_mut_refs)]
use gstd::msg;
use sails_rs::{
collections::{HashMap, HashSet},
Expand Down
1 change: 1 addition & 0 deletions vft-service/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
1 change: 1 addition & 0 deletions vmt-service/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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::{
Expand Down
1 change: 1 addition & 0 deletions vnft-service/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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::{
Expand Down
Loading