Skip to content

Commit d7b2325

Browse files
author
github-actions
committed
[BUILD][TRANSFER]
1 parent ff87440 commit d7b2325

304 files changed

Lines changed: 712 additions & 65101 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: build-single-exchange
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]') || contains(github.event.head_commit.message, '[PUBLISH]')) }}
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
24+
npm install typescript
25+
26+
- name: Build single exchange
27+
run: |
28+
cd build
29+
# get repository name and it's first word before hyphen and pass that as argument
30+
EXCHANGE_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2 | cut -d'-' -f1)
31+
npm run build-single-exchange -- $EXCHANGE_NAME
32+
33+
- name: Commit and push back changes
34+
run: |
35+
git config --local user.email "action@github.com"
36+
git config --local user.name "GitHub Action"
37+
git add README.md
38+
git add .
39+
git commit -m "pushback" || echo "No changes for commit"
40+
git push origin HEAD:main
41+
42+
- name: Set up Python
43+
if: contains(github.event.head_commit.message, '[PUBLISH]')
44+
uses: actions/setup-python@v4
45+
with:
46+
python-version: '3.x'
47+
48+
- name: Install dependencies
49+
if: contains(github.event.head_commit.message, '[PUBLISH]')
50+
run: |
51+
python -m pip install --upgrade pip
52+
pip install build twine
53+
54+
- name: PyPi package
55+
if: contains(github.event.head_commit.message, '[PUBLISH]')
56+
env:
57+
PYPI_API_SECRET_SP: ${{ secrets.PYPI_API_SECRET_SP }}
58+
run: |
59+
cd build
60+
npm run pypi-packager
61+
62+
- name: PyPi upload
63+
if: contains(github.event.head_commit.message, '[PUBLISH]')
64+
run: |
65+
cd ./temp_pypi
66+
python -m twine upload dist/*
67+
env:
68+
TWINE_USERNAME: __token__
69+
TWINE_PASSWORD: ${{ secrets.PYPI_API_SECRET_SP }}

‎.gitignore‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ __pycache__/
55
*.py[cod]
66
*$py.class
77

8-
.hyperliquid/
9-
108
# C extensions
119
*.so
1210

@@ -175,3 +173,4 @@ cython_debug/
175173
.pypirc
176174

177175
build/ccxt
176+
/build/package-lock.json

‎README.md‎

Lines changed: 0 additions & 158 deletions
This file was deleted.

0 commit comments

Comments
 (0)