From e7115726394d28a77b8c304612598c7e593a5ed7 Mon Sep 17 00:00:00 2001 From: Oleg Yankovich Date: Fri, 17 Jun 2022 04:34:44 +0400 Subject: [PATCH 1/3] Migrate to github actions --- .github/workflows/dev.yaml | 68 ++++++++++++++++++++++++++++++++++++ .github/workflows/prod.yaml | 67 +++++++++++++++++++++++++++++++++++ .github/workflows/stage.yaml | 68 ++++++++++++++++++++++++++++++++++++ 3 files changed, 203 insertions(+) create mode 100644 .github/workflows/dev.yaml create mode 100644 .github/workflows/prod.yaml create mode 100644 .github/workflows/stage.yaml diff --git a/.github/workflows/dev.yaml b/.github/workflows/dev.yaml new file mode 100644 index 00000000..a34283a8 --- /dev/null +++ b/.github/workflows/dev.yaml @@ -0,0 +1,68 @@ +name: Release to dev +on: + push: + branches: + - dev-cere + workflow_dispatch: + +jobs: + build: + runs-on: [self-hosted, cere-network-large-workers] + container: + image: node:14-buster + steps: + - uses: actions/checkout@v3 + - name: Install system packages + run: | + apt update + apt install -y python3 + - name: Restore cache + uses: actions/cache@v2 + with: + path: 'node_modules' + key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} + - name: Install packages + run: | + cp .env.dev .env + sh ./scripts/copy-dev-config.sh + yarn install + - name: Build + env: + CI: false + run: yarn build + - name: Prepare artifacts + uses: actions/upload-artifact@v2 + with: + name: build + path: build + + deploy: + runs-on: [self-hosted, cere-network-large-workers] + needs: build + container: + image: ubuntu:20.04 + steps: + - name: Restore build + uses: actions/download-artifact@v2 + with: + name: build + path: build + - name: Install aws-cli + env: + DEBIAN_FRONTEND: noninteractive + run: | + apt update + apt install -y awscli + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.DEV_NETWORK_AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.DEV_NETWORK_AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_REGION }} + - name: Deploy + env: + S3_BUCKET: ${{ secrets.S3_BUCKET_NAME_DEV }} + CF_DISTRIBUTION_ID: ${{ secrets.CF_DISTRIBUTION_ID_DEV }} + run: | + aws s3 sync --metadata-directive="REPLACE" build/ s3://${S3_BUCKET} + aws cloudfront create-invalidation --distribution-id ${CF_DISTRIBUTION_ID} --paths "/*" diff --git a/.github/workflows/prod.yaml b/.github/workflows/prod.yaml new file mode 100644 index 00000000..244a3317 --- /dev/null +++ b/.github/workflows/prod.yaml @@ -0,0 +1,67 @@ +name: Release to prod +on: + push: + branches: + - master-cere + +jobs: + build: + runs-on: [self-hosted, cere-network-large-workers] + container: + image: node:14-buster + steps: + - uses: actions/checkout@v3 + - name: Install system packages + run: | + apt update + apt install -y python3 + - name: Restore cache + uses: actions/cache@v2 + with: + path: 'node_modules' + key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} + - name: Install packages + run: | + cp .env.prod .env + sh ./scripts/copy-prod-config.sh + yarn install + - name: Build + env: + CI: false + run: yarn build + - name: Prepare artifacts + uses: actions/upload-artifact@v2 + with: + name: build + path: build + + deploy: + runs-on: [self-hosted, cere-network-large-workers] + needs: build + container: + image: ubuntu:20.04 + steps: + - name: Restore build + uses: actions/download-artifact@v2 + with: + name: build + path: build + - name: Install aws-cli + env: + DEBIAN_FRONTEND: noninteractive + run: | + apt update + apt install -y awscli + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.PRD_NETWORK_AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.PRD_NETWORK_AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_REGION }} + - name: Deploy + env: + S3_BUCKET: ${{ secrets.S3_BUCKET_NAME_PRD }} + CF_DISTRIBUTION_ID: ${{ secrets.CF_DISTRIBUTION_ID_PRD }} + run: | + aws s3 sync --metadata-directive="REPLACE" build/ s3://${S3_BUCKET} + aws cloudfront create-invalidation --distribution-id ${CF_DISTRIBUTION_ID} --paths "/*" diff --git a/.github/workflows/stage.yaml b/.github/workflows/stage.yaml new file mode 100644 index 00000000..09c0fb0e --- /dev/null +++ b/.github/workflows/stage.yaml @@ -0,0 +1,68 @@ +name: Release to stage +on: + push: + branches: + - 'release/**' + - 'hotfix/**' + +jobs: + build: + runs-on: [self-hosted, cere-network-large-workers] + container: + image: node:14-buster + steps: + - uses: actions/checkout@v3 + - name: Install system packages + run: | + apt update + apt install -y python3 + - name: Restore cache + uses: actions/cache@v2 + with: + path: 'node_modules' + key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} + - name: Install packages + run: | + cp .env.stage .env + sh ./scripts/copy-stage-config.sh + yarn install + - name: Build + env: + CI: false + run: yarn build + - name: Prepare artifacts + uses: actions/upload-artifact@v2 + with: + name: build + path: build + + deploy: + runs-on: [self-hosted, cere-network-large-workers] + needs: build + container: + image: ubuntu:20.04 + steps: + - name: Restore build + uses: actions/download-artifact@v2 + with: + name: build + path: build + - name: Install aws-cli + env: + DEBIAN_FRONTEND: noninteractive + run: | + apt update + apt install -y awscli + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.STG_NETWORK_AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.STG_NETWORK_AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_REGION }} + - name: Deploy + env: + S3_BUCKET: ${{ secrets.S3_BUCKET_NAME_STG }} + CF_DISTRIBUTION_ID: ${{ secrets.CF_DISTRIBUTION_ID_STG }} + run: | + aws s3 sync --metadata-directive="REPLACE" build/ s3://${S3_BUCKET} + aws cloudfront create-invalidation --distribution-id ${CF_DISTRIBUTION_ID} --paths "/*" From c178c95f2d200ae60283bc6f85007dd82f51fae4 Mon Sep 17 00:00:00 2001 From: Andrei Navoichyk Date: Tue, 5 Jul 2022 18:50:55 +0400 Subject: [PATCH 2/3] rename ERC20 to ERC-20 --- CHANGELOG.md | 2 ++ src/Components/Pages/TransferPage.tsx | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f75e3b4..cb8ea0f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## vNext +- Rename ERC20 to ERC-20 + ## v0.15.0 - Updated Devnet url diff --git a/src/Components/Pages/TransferPage.tsx b/src/Components/Pages/TransferPage.tsx index 680cfbb7..38f81c30 100644 --- a/src/Components/Pages/TransferPage.tsx +++ b/src/Components/Pages/TransferPage.tsx @@ -530,11 +530,11 @@ const TransferPage = () => { ) : walletType === "Ethereum" ? ( - Transfer Tokens (ERC20 to Native) + Transfer Tokens (ERC-20 to Native) ) : ( - Transfer Tokens (Native to ERC20) + Transfer Tokens (Native to ERC-20) ))} @@ -559,7 +559,7 @@ const TransferPage = () => { className={classes.EthWalletBtn} onClick={() => setWalletType("Ethereum")} > - Connect with ERC20 Wallet + Connect with ERC-20 Wallet {process.env.REACT_APP_CONNECT_WITH_SUBSTRATE_WALLET_ENABLED === "true" && ( From 0afe618e1a1ed3e4c430dc0085e347052d6e88b9 Mon Sep 17 00:00:00 2001 From: Andrei Navoichyk Date: Tue, 5 Jul 2022 22:32:51 +0400 Subject: [PATCH 3/3] set version 1.16.0 --- .env.dev | 2 +- .env.prod | 2 +- .env.stage | 2 +- CHANGELOG.md | 4 ++++ package.json | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.env.dev b/.env.dev index a905b45e..d11568e9 100644 --- a/.env.dev +++ b/.env.dev @@ -9,7 +9,7 @@ REACT_APP_SUPPORT_URL="https://t.me/ceretroubleshooting" ## These are only required if using Sentry for error logging REACT_APP_SENTRY_DSN_URL="https://3d39fa05d843482eb93377947b435b5b@o318183.ingest.sentry.io/5987177" SENTRY_AUTH_TOKEN="db67ae12222811ecabd2564b6436d30d" -REACT_APP_SENTRY_RELEASE="0.15.0" +REACT_APP_SENTRY_RELEASE="0.16.0" REACT_APP_MAINTENANCE=false REACT_APP_CONNECT_WITH_SUBSTRATE_WALLET_ENABLED=true diff --git a/.env.prod b/.env.prod index 58f12834..e33710e6 100644 --- a/.env.prod +++ b/.env.prod @@ -9,7 +9,7 @@ REACT_APP_SUPPORT_URL="https://t.me/ceretroubleshooting" ## These are only required if using Sentry for error logging REACT_APP_SENTRY_DSN_URL="https://3d39fa05d843482eb93377947b435b5b@o318183.ingest.sentry.io/5987177" SENTRY_AUTH_TOKEN="db67ae12222811ecabd2564b6436d30d" -REACT_APP_SENTRY_RELEASE="0.15.0" +REACT_APP_SENTRY_RELEASE="0.16.0" REACT_APP_MAINTENANCE=false REACT_APP_CONNECT_WITH_SUBSTRATE_WALLET_ENABLED=true diff --git a/.env.stage b/.env.stage index 2eeb22a0..96d54961 100644 --- a/.env.stage +++ b/.env.stage @@ -9,7 +9,7 @@ REACT_APP_SUPPORT_URL="https://t.me/ceretroubleshooting" ## These are only required if using Sentry for error logging REACT_APP_SENTRY_DSN_URL="https://3d39fa05d843482eb93377947b435b5b@o318183.ingest.sentry.io/5987177" SENTRY_AUTH_TOKEN="db67ae12222811ecabd2564b6436d30d" -REACT_APP_SENTRY_RELEASE="0.15.0" +REACT_APP_SENTRY_RELEASE="0.16.0" REACT_APP_MAINTENANCE=false REACT_APP_CONNECT_WITH_SUBSTRATE_WALLET_ENABLED=true diff --git a/CHANGELOG.md b/CHANGELOG.md index cb8ea0f8..bacf4d18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## vNext +- ... + +## v0.16.0 + - Rename ERC20 to ERC-20 ## v0.15.0 diff --git a/package.json b/package.json index 2698a3ff..350039b5 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@Cerebellum-Network/chainbridge-ui", - "version": "0.15.0", + "version": "0.16.0", "private": true, "dependencies": { "@babel/core": "^7.12.3",