diff --git a/.github/workflows/run-template-dapps-integration.yml b/.github/workflows/run-template-dapps-integration.yml new file mode 100644 index 000000000..6369271dc --- /dev/null +++ b/.github/workflows/run-template-dapps-integration.yml @@ -0,0 +1,21 @@ +name: run-template-dapps-integration + +on: + pull_request: + branches: [main] + repository_dispatch: + types: run-template-dapps-integration + workflow_dispatch: + +jobs: + run_template_dapps_integration_script: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.ref }} + - name: Run script file + run: | + chmod +x ./scripts/template-dapps-integration.sh + ./scripts/template-dapps-integration.sh + shell: bash diff --git a/CHANGELOG.md b/CHANGELOG.md index bea8b921b..54710aaea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [[v2.22.4]](https://github.com/multiversx/mx-sdk-dapp/pull/954)] - 2023-10-13 +- [Integration tests](https://github.com/multiversx/mx-sdk-dapp/pull/953) + ## [[v2.22.3]](https://github.com/multiversx/mx-sdk-dapp/pull/949)] - 2023-10-12 - [Add used indexes to addressTable component](https://github.com/multiversx/mx-sdk-dapp/pull/948) diff --git a/package.json b/package.json index 6bf0a677e..b4c86d061 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@multiversx/sdk-dapp", - "version": "2.22.3", + "version": "2.22.4", "description": "A library to hold the main logic for a dapp on the MultiversX blockchain", "author": "MultiversX", "license": "GPL-3.0-or-later", diff --git a/scripts/template-dapps-integration.sh b/scripts/template-dapps-integration.sh new file mode 100644 index 000000000..9d6b0554b --- /dev/null +++ b/scripts/template-dapps-integration.sh @@ -0,0 +1,63 @@ +#!/bin/sh + +# Exit with nonzero exit code if anything fails +set -e + +# Install prerequisites +echo "Installing yarn..." +npm install --global yarn +echo "Installing yalc..." +npm install -global yalc + + +# Prepare mx-sdk-dapp for publishing +git clone https://github.com/multiversx/mx-sdk-dapp.git + +echo "cd mx-sdk-dapp..." +cd mx-sdk-dapp +git checkout development + +echo "Installing dependencies for mx-sdk-dapp..." +yarn install + +echo "Building mx-sdk-dapp..." +yarn build + +echo "Publishing mx-sdk-dapp..." +cd dist +yalc publish +cd ../.. + + +# Consume mx-sdk-dapp in mx-template-dapp +git clone https://github.com/multiversx/mx-template-dapp.git + +echo "cd mx-template-dapp..." +cd mx-template-dapp + +echo "Installing dependencies mx-template-dapp..." +yarn install + +echo "Linking mx-sdk-dapp..." +yalc add @multiversx/sdk-dapp + +echo "Building mx-template-dapp..." +yarn build:devnet + + +# Consume mx-sdk-dapp in mx-template-dapp-nextjs +git clone https://github.com/multiversx/mx-template-dapp-nextjs.git + +echo "cd mx-template-dapp-nextjs..." +cd mx-template-dapp-nextjs + +echo "Installing dependencies mx-template-dapp-nextjs..." +yarn install + +echo "Linking mx-sdk-dapp..." +yalc add @multiversx/sdk-dapp + +echo "Building mx-template-dapp-nextjs..." +yarn build-devnet + +echo "Script executed successfully!"