Skip to content

Merge pull request #1 from SutuLabs/feat_o1js #19

Merge pull request #1 from SutuLabs/feat_o1js

Merge pull request #1 from SutuLabs/feat_o1js #19

Workflow file for this run

name: build-ui
on:
push:
branches:
- main
paths:
- "contracts/src/**"
- "contracts/utils/fetchAccount.ts"
- "contracts/server/challengeData.ts"
- "contracts/server/services/model.ts"
- "ui/**"
- ".github/workflows/build-ui.yml"
pull_request:
branches:
- main
paths:
- "contracts/src/**"
- "contracts/utils/fetchAccount.ts"
- "contracts/server/challengeData.ts"
- "contracts/server/services/model.ts"
- "ui/**"
- ".github/workflows/build-ui.yml"
env:
VERSION: 0.1.${{ github.run_number }}
defaults:
run:
working-directory: ./ui
jobs:
build-pawket:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set Node.js 16.x (ui)
uses: actions/setup-node@v3
with:
node-version: 16
cache: "yarn"
cache-dependency-path: "ui/yarn.lock"
- name: Set Node.js 16.x (contracts)
uses: actions/setup-node@v3
with:
node-version: 16
cache: "npm"
cache-dependency-path: "contracts/package-lock.json"
- name: Install Dependencies (contracts)
run: yarn
working-directory: contracts/
- name: Install Dependencies
run: yarn
- name: Change version number
run: |
sed -i "s/0.1/${VERSION}/" .env
- name: Build
run: |
yarn build
- name: version
run: |
echo ${VERSION}>dist/spa/version.txt
- uses: actions/upload-artifact@v3
with:
name: ui
path: ui/dist/spa