Skip to content

fix: rename agent_id to id in AgentDetailsResponse (#75) #27

fix: rename agent_id to id in AgentDetailsResponse (#75)

fix: rename agent_id to id in AgentDetailsResponse (#75) #27

name: Build and Release Predict UI
on:
push:
tags:
- 'v*-omenstrat-trader'
- 'v*-polystrat-trader'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '22.x'
cache: 'yarn'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
**/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Set variables
run: |
TAG="${{ github.ref_name }}"
if [[ "$TAG" == *-omenstrat-trader ]]; then
echo "REACT_APP_AGENT_NAME=omenstrat_trader" >> $GITHUB_ENV
elif [[ "$TAG" == *-polystrat-trader ]]; then
echo "REACT_APP_AGENT_NAME=polystrat_trader" >> $GITHUB_ENV
else
echo "Unknown tag format: $TAG"
exit 1
fi
- name: Build predict-ui app
run: yarn nx build predict-ui
- name: Zip predict-ui build
run: |
cd dist/apps/predict-ui
zip -r ../../../predict-ui-build.zip .
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: predict-ui-build.zip
name: Release ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}