Skip to content

Merge branch 'tanya/20-olas-alert' of github.com:valory-xyz/olas-oper… #211

Merge branch 'tanya/20-olas-alert' of github.com:valory-xyz/olas-oper…

Merge branch 'tanya/20-olas-alert' of github.com:valory-xyz/olas-oper… #211

Workflow file for this run

name: Release
# This workflow is triggered on pushing a tag BE CAREFUL this application AUTO UPDATES !!!
# git tag vX.Y.Z
# git push origin tag vX.Y.Z
on:
push:
tags:
- 'v*.*.*'
jobs:
build-macos-pyinstaller:
runs-on: macos-latest
strategy:
matrix:
arch: [ x64, arm64 ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: '1.4.0'
virtualenvs-create: true
virtualenvs-in-project: false
virtualenvs-path: ~/my-custom-path
installer-parallel: true
- name: Install dependencies
run: poetry install
- name: Get trader bin
run: |
trader_version=$(poetry run python -c "import yaml; config = yaml.safe_load(open('templates/trader.yaml')); print(config['configuration']['trader_version'])")
echo $trader_version
mkdir dist && curl -L -o dist/aea_bin "https://github.com/valory-xyz/trader/releases/download/${trader_version}/trader_bin_${{ matrix.arch }}"
- name: Build with PyInstaller
run: |
poetry run pyinstaller operate/services/utils/tendermint.py --onefile
poetry run pyinstaller --collect-data eth_account --collect-all aea --collect-all autonomy --collect-all operate --collect-all aea_ledger_ethereum --collect-all aea_ledger_cosmos --collect-all aea_ledger_ethereum_flashbots --hidden-import aea_ledger_ethereum --hidden-import aea_ledger_cosmos --hidden-import aea_ledger_ethereum_flashbots operate/pearl.py --add-binary dist/aea_bin:. --add-binary dist/tendermint:. --onefile --name pearl_${{ matrix.arch }}
- name: Upload Release Assets
uses: actions/upload-artifact@v2
with:
name: pearl_${{ matrix.arch }}
path: dist/pearl_${{ matrix.arch }}
release-operate:
runs-on: macos-latest
needs:
- "build-macos-pyinstaller"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: pearl_x64
path: electron/bins/
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: pearl_arm64
path: electron/bins/
- name: Add exec permissions
run: chmod +x electron/bins/pearl_x64 && chmod +x electron/bins/pearl_arm64
- uses: snok/install-poetry@v1
with:
version: "1.7.1"
virtualenvs-create: true
virtualenvs-in-project: false
virtualenvs-path: ~/my-custom-path
installer-parallel: true
- run: yarn install-deps
- name: "Build frontend with env vars"
run: yarn build:frontend
env:
NODE_ENV: production
DEV_RPC: https://rpc-gate.autonolas.tech/gnosis-rpc/
IS_STAGING: ${{ github.ref != 'refs/heads/main' && 'true' || 'false' }}
FORK_URL: https://rpc-gate.autonolas.tech/gnosis-rpc/
- run: rm -rf /dist
- name: "Build, notarize, publish"
env:
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLEIDPASS }}
APPLE_ID: ${{ secrets.APPLEID }}
APPLETEAMID: ${{ secrets.APPLETEAMID }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
CSC_LINK: ${{ secrets.CSC_LINK }}
GH_TOKEN: ${{ secrets.github_token}}
NODE_ENV: production
DEV_RPC: https://rpc-gate.autonolas.tech/gnosis-rpc/
FORK_URL: https://rpc-gate.autonolas.tech/gnosis-rpc/
run: node build.js
- name: "Build frontend with dev env vars"
run: yarn build:frontend
env:
NODE_ENV: development
DEV_RPC: https://virtual.gnosis.rpc.tenderly.co/78ca845d-2b24-44a6-9ce2-869a979e8b5b
IS_STAGING: ${{ github.ref != 'refs/heads/main' && 'true' || 'false' }}
FORK_URL: https://virtual.gnosis.rpc.tenderly.co/78ca845d-2b24-44a6-9ce2-869a979e8b5b
- name: "Build, notarize, publish dev build"
env:
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLEIDPASS }}
APPLE_ID: ${{ secrets.APPLEID }}
APPLETEAMID: ${{ secrets.APPLETEAMID }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
CSC_LINK: ${{ secrets.CSC_LINK }}
GH_TOKEN: ${{ secrets.github_token}}
NODE_ENV: development
DEV_RPC: https://virtual.gnosis.rpc.tenderly.co/78ca845d-2b24-44a6-9ce2-869a979e8b5b
FORK_URL: https://virtual.gnosis.rpc.tenderly.co/78ca845d-2b24-44a6-9ce2-869a979e8b5b
run: |
echo "DEV_RPC=https://virtual.gnosis.rpc.tenderly.co/78ca845d-2b24-44a6-9ce2-869a979e8b5b" >> .env
echo -e "FORK_URL=https://virtual.gnosis.rpc.tenderly.co/78ca845d-2b24-44a6-9ce2-869a979e8b5b" >> .env
node build.js