Skip to content

Commit

Permalink
Merge pull request #1 from multiversx/initial-commit
Browse files Browse the repository at this point in the history
initial commit
  • Loading branch information
dorin-iancu authored Oct 9, 2023
2 parents 54a6be0 + 079d682 commit cc3c43c
Show file tree
Hide file tree
Showing 218 changed files with 12,925 additions and 1,040 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ permissions:
jobs:
contracts:
name: Contracts
uses: ElrondNetwork/elrond-actions/.github/workflows/contracts.yml@v1
uses: multiversx/mx-sc-actions/.github/workflows/contracts.yml@v2.3.1
with:
rust-toolchain: nightly-2022-03-01
vmtools-version: v1.4.43
extra-build-args: --ignore-eei-checks
rust-toolchain: nightly-2023-05-26
vmtools-version: v1.4.60
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
79 changes: 79 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Create release

on:
workflow_dispatch:
inputs:
tag:
required: true
description: Release tag
title:
required: true
description: Release title
image_tag:
type: choice
required: true
description: Image multiversx/sdk-rust-contract-builder
options:
- v3.1.0
- v4.0.2
- v4.0.3

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ env.GITHUB_REF_NAME }}
fetch-depth: 0
repository: ${{ env.GITHUB_REPOSITORY }}

- name: Download build script
run: |
wget https://raw.githubusercontent.com/multiversx/mx-sdk-rust-contract-builder/${{ github.event.inputs.image_tag }}/build_with_docker.py
- name: Build contract
run: |
python3 ./build_with_docker.py --no-docker-tty --image=multiversx/sdk-rust-contract-builder:${{ github.event.inputs.image_tag }} --project=. --output=/home/runner/work/output-from-docker
- name: Save artifacts
uses: actions/upload-artifact@v2
with:
name: built-contracts
path: |
/home/runner/work/output-from-docker/**/*.wasm
/home/runner/work/output-from-docker/**/*.abi.json
if-no-files-found: error

release:
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
with:
fetch-depth: "0"

- name: Download all workflow artifacts
uses: actions/download-artifact@v2
with:
path: assets

- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Built using Docker image: **multiversx/sdk-rust-contract-builder:${{ github.event.inputs.image_tag }}**." >> notes.txt
echo "" >> notes.txt
echo "## Codehash (blake2b):" >> notes.txt
echo "" >> notes.txt
for i in $(find ./assets -type f -name *.wasm); do
filename=$(basename ${i})
checksum=($(b2sum -l 256 ${i}))
echo " - **${filename}**: \`${checksum}\`" >> notes.txt
done
gh release create ${{ github.event.inputs.tag }} --target=$GITHUB_SHA --prerelease --title="${{ github.event.inputs.title }}" --generate-notes --notes-file=notes.txt
sleep 10
gh release upload ${{ github.event.inputs.tag }} $(find ./assets -type f)
14 changes: 0 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,9 @@
# will have compiled files and executables
**/target/
**/output/
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

# VSCode specific files
.vscode/*
elrond.workspace.json

# Elrond IDE
**/node_modules
**/output/**
**/testnet/**
**/erdpy.data-storage.json
**/*.interaction.json

# Python scripts
**/__pycache__/**
Loading

0 comments on commit cc3c43c

Please sign in to comment.