generated from multiversx/mx-template-sc
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
54a6be0
commit 079d682
Showing
218 changed files
with
12,925 additions
and
1,040 deletions.
There are no files selected for viewing
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
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
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) |
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
Oops, something went wrong.