Skip to content

Commit ca58506

Browse files
committed
Add USD ROSE prices
1 parent fd871e8 commit ca58506

17 files changed

Lines changed: 15493 additions & 1100 deletions

.changelog/6.feature.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add USD ROSE prices at the day of the transactions

.github/workflows/ci-build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
uses: actions/checkout@v6
2626
with:
2727
submodules: true
28-
- name: Set up Node.js 20
28+
- name: Set up Node.js 24
2929
uses: actions/setup-node@v6
3030
with:
31-
node-version: "20.x"
31+
node-version: "24.x"
3232
cache: yarn
3333
- name: Install dependencies
3434
run: yarn install --frozen-lockfile
@@ -37,6 +37,8 @@ jobs:
3737
id: vars
3838
run: |
3939
echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
40+
- name: Run tests
41+
run: yarn test
4042
- name: Build app
4143
run: yarn build
4244
- name: Upload build artifacts

.github/workflows/ci-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ jobs:
3333
uses: actions/setup-python@v6
3434
with:
3535
python-version: "3.x"
36-
- name: Set up Node.js 20
36+
- name: Set up Node.js 24
3737
uses: actions/setup-node@v6
3838
with:
39-
node-version: "20.x"
39+
node-version: "24.x"
4040
cache: yarn
4141
- name: Install dependencies
4242
run: yarn install --frozen-lockfile
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: update-prices
2+
3+
on:
4+
schedule:
5+
# Run daily at 01:00 UTC (after midnight to ensure previous day's candle is closed)
6+
- cron: '0 1 * * *'
7+
workflow_dispatch: # Allow manual trigger
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
update-prices:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '24'
23+
24+
- name: Update ROSE prices
25+
run: node scripts/update-prices.js
26+
27+
- name: Commit and push changes
28+
run: |
29+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
30+
git config --local user.name "github-actions[bot]"
31+
32+
if git diff --quiet; then
33+
echo "No changes to commit"
34+
else
35+
git add src/prices/rose-usd.json
36+
git commit -m "chore: update ROSE/USD prices"
37+
git push
38+
fi

0 commit comments

Comments
 (0)