Skip to content

Commit 595ae4f

Browse files
author
github-actions
committed
[BUILD]: 4cd56d8bf759f61eea34d68e5b7e259871692284
1 parent 057ce5e commit 595ae4f

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: build
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
build_for_pypi:
9+
if: ${{ github.event.repository.name != 'ccxt-python-single-exchange' && contains(github.event.head_commit.message, '[BUILD]') }}
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
with:
15+
ref: ${{ github.ref }}
16+
- name: Install npm
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '22'
20+
- name: Install dependencies
21+
run: |
22+
cd build
23+
npm install typescript
24+
npm install tsx
25+
- name: Build
26+
run: |
27+
cd build || echo "already in build"
28+
# get repository name and it's first word before hypher and pass that as argument
29+
REPO_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2 | cut -d'-' -f1)
30+
echo "REPO_NAME: $REPO_NAME"
31+
npm run build -- $REPO_NAME
32+
33+
- name: Commit and push changes
34+
run: |
35+
git config --local user.email "[email protected]"
36+
git config --local user.name "GitHub Action"
37+
git add README.md
38+
git commit -m "Update README with exchange repository links" || echo "No changes to commit"
39+
git push

0 commit comments

Comments
 (0)