Skip to content

Running workflow for smart contracts #1196

Running workflow for smart contracts

Running workflow for smart contracts #1196

name: "Smart Contracts"
run-name: "Running workflow for smart contracts"
on:
push:
branches:
- "main"
tags:
- "*"
paths-ignore:
- "README.md"
pull_request:
branches:
- "main"
paths-ignore:
- "README.md"
jobs:
perform_checks:
uses: "./.github/workflows/checks_general.yaml"
build_optimized:
uses: "./.github/workflows/build_optimized.yaml"
if: "github.ref_type == 'tag'"
needs:
- "perform_checks"
draft_release:
runs-on: ubuntu-latest
needs:
- "build_optimized"
permissions: "write-all"
steps:
- name: "Download artifacts"
uses: "actions/download-artifact@v3"
- name: "Display structure of downloaded files"
run: "ls -R"
- name: "Create ZIP files with binaries"
shell: "sh"
run: |
for dir in optimized-binaries-protocol-*-*/
do
dir="${dir%/*}"
stripped="${dir#*optimized-binaries-protocol-}"
net="${stripped%%-*}"
protocol="${stripped#*-}"
target_dir="optimized-binaries-${net}-net/${protocol}/"
mkdir -p "${target_dir}"
cp -t "${target_dir}" "${dir}"/*
done
zip -j -r "optimized-binaries-common.zip" "optimized-binaries-platform"/*
for dir in optimized-binaries-*-net/
do
zip -j -r "${dir%/*}".zip "${dir%/*}"/*
done
# temporary using commit as version until it is merged. Updates node version v12 -> v16
- uses: "marvinpinto/action-automatic-releases@6273874b61ebc8c71f1a61b2d98e234cf389b303"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
draft: true
files: |
optimized-binaries-common.zip
optimized-binaries-dev-net.zip
optimized-binaries-test-net.zip
optimized-binaries-main-net.zip