Skip to content

Commit 9d140d6

Browse files
committed
[CI] add octobot release
1 parent e375ff0 commit 9d140d6

5 files changed

Lines changed: 313 additions & 29 deletions

File tree

.github/workflows/ob_release.yml

Lines changed: 270 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,270 @@
1+
name: OB Release workflow
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
example_input:
7+
description: 'An example input value'
8+
required: false
9+
default: 'default-value'
10+
# workflow_dispatch:
11+
# push:
12+
# branches: [ main, master ]
13+
# pull_request:
14+
# branches: [ main, master ]
15+
16+
permissions:
17+
contents: read
18+
19+
20+
jobs:
21+
manual-job:
22+
runs-on: ubuntu-latest
23+
# environment: Prod
24+
# if: github.ref == 'refs/heads/octobot' && contains(fromJSON('["Herklos", "GuillaumeDSM"]'), github.actor)
25+
26+
steps:
27+
# - name: Print Trigger Info
28+
# run: |
29+
# echo "This workflow was triggered manually."
30+
# echo "Input value: ${{ github.event.inputs.example_input }}"
31+
- uses: actions/checkout@v4
32+
# - name: Setup PHP with PECL extension
33+
# uses: shivammathur/setup-php@v2
34+
# with:
35+
# php-version: '8.4.6'
36+
# # cache: true
37+
# ini-values: |
38+
# zend.assertions=1
39+
# display_errors=On
40+
- uses: actions/setup-python@v5
41+
with:
42+
python-version: '3.11'
43+
cache: 'pip'
44+
# - name: create usr/share/dotnet folder
45+
# run: |
46+
# sudo mkdir -p /usr/share/dotnet
47+
# - uses: actions/setup-dotnet@v4
48+
# with:
49+
# dotnet-version: '9.0.x'
50+
# dotnet-quality: 'preview'
51+
# run: |
52+
# sudo mkdir -p /usr/share/dotnet
53+
- name: Install NPM dependencies
54+
run: npm ci
55+
# - name: Composer install
56+
# run: composer install
57+
- name: Install python dependencies
58+
run: pip install -r ci-requirements.txt
59+
- name: Install Wheel
60+
run: pip install wheel twine
61+
- name: Transpile and Build (JS + Python only)
62+
run: npm run force-build-js-py
63+
- name: Base tests Rest
64+
run: npm run test-base-rest-js-py
65+
- name: Base tests Ws
66+
run: npm run test-base-ws-js-py
67+
- name: Id tests
68+
run: npm run id-tests-js-py
69+
- name: Request tests
70+
run: npm run request-tests-js-py
71+
- name: Response tests
72+
run: npm run response-tests-js-py
73+
- name: CommonJs tests
74+
run: npm run commonjs-test
75+
- name: Package Test
76+
run: npm run package-test
77+
- name: Freshness Test
78+
run: npm run test-freshness
79+
# - name: Set new Version
80+
# run: |
81+
# npm config set git-tag-version=false
82+
# NEW_VERSION=$(./build/smart-bump.sh)
83+
# NPM_VERSION=$(npm version "$NEW_VERSION")
84+
# echo "NPM_VERSION=$NPM_VERSION" >> $GITHUB_ENV
85+
# COMMIT_MESSAGE=${NPM_VERSION:1}
86+
# echo "COMMIT_MESSAGE=$COMMIT_MESSAGE" >> $GITHUB_ENV
87+
# - name: Pull changes
88+
# run: |
89+
# git config --global user.name "github-actions[bot]"
90+
# git config --global user.email "github-actions[bot]@users.noreply.github.com"
91+
# git config --global pull.rebase false
92+
# git add go/
93+
# git commit -m "[Automated changes] GO"
94+
# git pull -X ours origin master --no-edit
95+
# - name: Commit files
96+
# run: git add . -A
97+
# - name: Git status
98+
# run: git status
99+
# - name: cleanup old tags
100+
# run: npm run cleanup-old-tags --limit
101+
# - name: Generate Release Notes
102+
# env:
103+
# COMMIT_MESSAGE: ${{ env.COMMIT_MESSAGE }}
104+
# GH_TOKEN: ${{ github.token }}
105+
# VERSION: ${{ env.NPM_VERSION }}
106+
# run: |
107+
# echo "COMMIT_MESSAGE=$COMMIT_MESSAGE"
108+
# git config --global user.name "github-actions[bot]"
109+
# git config --global user.email "github-actions[bot]@users.noreply.github.com"
110+
# git commit -m "[Automated changes] ${COMMIT_MESSAGE}"
111+
# git push origin HEAD:master
112+
# git fetch --tags --depth=1
113+
# PREVIOUS_TAG=$(git tag --sort=-creatordate | head -n1)
114+
# echo "Previous tag: ${PREVIOUS_TAG}"
115+
116+
117+
# git tag -a "go/${VERSION}" -m "${COMMIT_MESSAGE}"
118+
# git push origin "go/${VERSION}"
119+
120+
# git tag -a "${VERSION}" -m "${COMMIT_MESSAGE}"
121+
# git push origin "${VERSION}"
122+
123+
# echo "Creating GitHub release from ${VERSION}…"
124+
# gh release create "${VERSION}" --generate-notes --notes-start-tag "${PREVIOUS_TAG}" --verify-tag
125+
# - name: Publish Go node_modules
126+
# env:
127+
# VERSION: ${{ env.NPM_VERSION }}
128+
# run: |
129+
# cd go/
130+
# GOPROXY=proxy.golang.org go list -m github.com/ccxt/ccxt/go/v4@$VERSION
131+
# cd ..
132+
# - name: C# Release Build
133+
# run: npm run buildCSRelease
134+
# - name: Deploy C#
135+
# env:
136+
# NUGGET_TOKEN: ${{ secrets.NUGET_PROD }}
137+
# run: ./cs/deploy.sh;
138+
- name: Deploy Python
139+
env:
140+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
141+
run: cd python && ./deploy.sh && cd ..;
142+
# todo restore npm publish later on
143+
# - uses: JS-DevTools/npm-publish@v3
144+
# with:
145+
# token: ${{ secrets.NPM_PROD }}
146+
# # jobs:
147+
# manual-job:
148+
# runs-on: ubuntu-latest
149+
# if: github.ref == 'refs/heads/master'
150+
# steps:
151+
# - name: Print Trigger Info
152+
# run: |
153+
# echo "This workflow was triggered manually."
154+
# echo "Input value: ${{ github.event.inputs.example_input }}"
155+
# - uses: actions/checkout@v4
156+
# with:
157+
# ssh-key: ${{secrets.SECRET_KEY}}
158+
# fetch-depth: 2
159+
# - uses: actions/setup-node@v4
160+
# with:
161+
# node-version: '20'
162+
# registry-url: "https://registry.npmjs.org"
163+
# - name: Setup PHP with PECL extension
164+
# uses: shivammathur/setup-php@v2
165+
# with:
166+
# php-version: '8.1'
167+
# - uses: actions/setup-python@v5
168+
# with:
169+
# python-version: '3.11'
170+
# cache: 'pip'
171+
# - name: create usr/share/dotnet folder
172+
# run: |
173+
# sudo mkdir -p /usr/share/dotnet
174+
# - uses: actions/setup-dotnet@v4
175+
# with:
176+
# dotnet-version: '7.0.x'
177+
# dotnet-quality: 'preview'
178+
# run: |
179+
# sudo mkdir -p /usr/share/dotnet
180+
# - uses: actions/checkout@v4
181+
# - name: Setup Go
182+
# uses: actions/setup-go@v5
183+
# with:
184+
# go-version: "1.21.x"
185+
# - name: Install NPM dependencies
186+
# run: npm ci
187+
# - name: Composer install
188+
# run: composer install
189+
# - name: Install python dependencies
190+
# run: pip install -r ci-requirements.txt
191+
# - name: Install Wheel
192+
# run: pip install wheel twine
193+
# - name: export exchanges (remove later)
194+
# run: npm run export-exchanges
195+
# # # - name: Transpile and Build
196+
# # # run: npm run force-build
197+
# # - name: Base tests Rest
198+
# # run: npm run test-base-rest
199+
# # - name: Base tests Ws
200+
# # run: npm run test-base-ws
201+
# # - name: Id tests
202+
# # run: npm run id-tests
203+
# # - name: Request tests
204+
# # run: npm run request-tests
205+
# # - name: Response tests
206+
# # run: npm run response-tests
207+
# # # - name: CommonJs tests
208+
# # # run: npm run commonjs-test tmp disabling it
209+
# # - name: Package Test
210+
# # run: npm run package-test
211+
# # - name: Freshness Test
212+
# # run: npm run test-freshness
213+
# # - name: Go Types Test
214+
# # run: npm run test-types-go
215+
# # Will start the deployment process
216+
# - name: Set new Version
217+
# run: |
218+
# npm config set git-tag-version=false
219+
# NPM_VERSION=$(npm version patch)
220+
# echo "NPM_VERSION=$NPM_VERSION" >> $GITHUB_ENV
221+
# COMMIT_MESSAGE=${NPM_VERSION:1}
222+
# echo "COMMIT_MESSAGE=$COMMIT_MESSAGE" >> $GITHUB_ENV
223+
# - name: Pull changes
224+
# run: |
225+
# git config --global pull.rebase false
226+
# git pull origin master
227+
# - name: vss and copy python-files
228+
# run: npm run vss && npm run copy-python-files
229+
# - name: Commit files
230+
# run: git add . -A
231+
# - name: Git status
232+
# run: git status
233+
# - name: cleanup old tags
234+
# run: npm run cleanup-old-tags --limit
235+
# - name: Create GH Release and git-tag-version and push
236+
# env:
237+
# COMMIT_MESSAGE: ${{ env.COMMIT_MESSAGE }}
238+
# NPM_VERSION: ${{ env.NPM_VERSION }}
239+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
240+
# run: |
241+
# echo "COMMIT_MESSAGE=$COMMIT_MESSAGE"
242+
# git config --global user.name "github-actions[bot]"
243+
# git config --global user.email "github-actions[bot]@users.noreply.github.com"
244+
# git remote set-url origin https://${GITHUB_TOKEN}@github.com/${{ github.repository }}
245+
# git tag -a "${NPM_VERSION}" -m "${COMMIT_MESSAGE}"
246+
# git commit -m "${COMMIT_MESSAGE}"
247+
# git remote set-url origin https://${GITHUB_TOKEN}@github.com/${{ github.repository }}
248+
# git push --tags
249+
# echo "Creating github release..."
250+
# gh release create "${NPM_VERSION}" --generate-notes --verify-tag
251+
# git push origin HEAD:master
252+
253+
# - name: Publish Go node_modules
254+
# env:
255+
# VERSION: ${{ env.NPM_VERSION }}
256+
# run: |
257+
# GOPROXY=proxy.golang.org go list -m github.com/ccxt/ccxt@$VERSION
258+
# - name: C# Release Build
259+
# run: npm run buildCSRelease
260+
# - name: Deploy C#
261+
# env:
262+
# NUGGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
263+
# run: ./cs/deploy.sh;
264+
# - name: Deploy Python
265+
# env:
266+
# PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
267+
# run: cd python && ./deploy.sh && cd ..;
268+
# - uses: JS-DevTools/npm-publish@v3
269+
# with:
270+
# token: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "ccxt",
3-
"version": "4.5.51",
2+
"name": "octobot_ccxt",
3+
"version": "0.0.1",
44
"description": "A cryptocurrency trading API with more than 100 exchanges in JavaScript / TypeScript / Python / C# / PHP / Go",
55
"unpkg": "dist/ccxt.browser.min.js",
66
"type": "module",
@@ -24,7 +24,7 @@
2424
},
2525
"repository": {
2626
"type": "git",
27-
"url": "git+https://github.com/ccxt/ccxt.git"
27+
"url": "git+https://github.com/Drakkar-Software/ccxt.git"
2828
},
2929
"readme": "README.md",
3030
"scripts": {
@@ -66,6 +66,8 @@
6666
"force-build-slow": "npm run pre-transpile && npm run force-transpile && npm run post-transpile && npm run update-badges",
6767
"pre-transpile-js": "npm run export-exchanges && npm run vss && npm run emitAPITs && npm run tsBuild && npm run validate-types && npm run tsBuildExamples && npm run check-js-syntax && npm run bundle",
6868
"pre-transpile-py": "npm run export-exchanges && npm run emitAPIPy",
69+
"pre-transpile-js-py": "npm run export-exchanges && npm run vss && npm run emitAPITs && npm run emitAPIPy && npm run tsBuild && npm run validate-types && npm run tsBuildExamples && npm run copy-python-files && npm run check-js-syntax && npm run bundle",
70+
"force-build-js-py": "npm run pre-transpile-js-py && npm run force-transpile-fast-py && npm run check-python-syntax && npm run update-badges",
6971
"pre-transpile-php": "npm run export-exchanges && npm run emitAPIPhp",
7072
"pre-transpile-go": "npm run export-exchanges && npm run emitAPIGo",
7173
"pre-transpile-js-simple": "npm run export-exchanges && npm run emitAPITs && tsc && npm run validate-types",
@@ -154,6 +156,7 @@
154156
"request-cs": "npm run ti-cs -- --requestTests",
155157
"request-go": "npm run ti-go -- --requestTests",
156158
"request-tests//withoutGo": "npm run request-js && npm run request-py && npm run request-php && npm run request-cs",
159+
"request-tests-js-py": "npm run request-js && npm run request-py",
157160
"request-tests": "npm run request-js && npm run request-py && npm run request-php && npm run request-cs && npm run request-go",
158161
"response-ts": "npm run ti-ts -- --responseTests",
159162
"response-js": "npm run ti-js -- --responseTests",
@@ -167,13 +170,15 @@
167170
"response-php": "npm run response-php-sync && npm run response-php-async",
168171
"response-tests": "npm run response-js && npm run response-py && npm run response-php && npm run response-cs && npm run response-go",
169172
"response-tests//withoutGo": "npm run response-js && npm run response-py && npm run response-php && npm run response-cs",
173+
"response-tests-js-py": "npm run response-js && npm run response-py",
170174
"static-updater": "tsx ./utils/update-static-json --update",
171175
"id-tests-js": "npm run ti-js -- --idTests",
172176
"id-tests-py": "npm run ti-py -- --idTests",
173177
"id-tests-php": "npm run ti-php -- --idTests",
174178
"id-tests-cs": "npm run ti-cs -- --idTests",
175179
"id-tests-go": "npm run ti-go -- --idTests",
176180
"id-tests": "npm run id-tests-js && npm run id-tests-py && npm run id-tests-php && npm run id-tests-cs",
181+
"id-tests-js-py": "npm run id-tests-js && npm run id-tests-py",
177182
"id-tests//withGO": "npm run id-tests-js && npm run id-tests-py && npm run id-tests-php && npm run id-tests-cs && npm run id-tests-go",
178183
"test-base-rest-ts": "npm run ti-ts -- --baseTests",
179184
"test-ob-ts": "npm run ti-ts -- --obTests",
@@ -191,7 +196,9 @@
191196
"test-base-ws-cs": "npm run ti-cs -- --baseTests --ws",
192197
"test-base-ws-go": "npm run ti-go -- --baseTests --ws",
193198
"test-base-rest": "npm run test-base-rest-js && npm run test-base-rest-py && npm run test-base-rest-php && npm run test-base-rest-cs",
199+
"test-base-rest-js-py": "npm run test-base-rest-js && npm run test-base-rest-py",
194200
"test-base-ws": "npm run test-base-ws-js && npm run test-base-ws-py && npm run test-base-ws-php && npm run test-base-ws-cs && npm run test-base-ws-go",
201+
"test-base-ws-js-py": "npm run test-base-ws-js && npm run test-base-ws-py",
195202
"test": "npm run build && npm run commonjs-test && npm run id-tests && npm run request-tests && npm run response-tests && npm run live-tests",
196203
"commonjs-test": "node ./utils/test-commonjs.cjs",
197204
"package-test": "./utils/package-test.sh",
@@ -241,15 +248,15 @@
241248
"webpack": "^5.76.2"
242249
},
243250
"author": {
244-
"name": "Igor Kroitor",
245-
"email": "igor.kroitor@gmail.com",
246-
"url": "https://github.com/kroitor"
251+
"name": "Drakkar-Software",
252+
"email": "contact@drakkar.software",
253+
"url": "https://github.com/Drakkar-Software"
247254
},
248255
"license": "MIT",
249256
"bugs": {
250-
"url": "https://github.com/ccxt/ccxt/issues"
257+
"url": "https://github.com/Drakkar-Software/ccxt/issues"
251258
},
252-
"homepage": "https://ccxt.com",
259+
"homepage": "https://github.com/Drakkar-Software/ccxt",
253260
"keywords": [
254261
"algorithmic",
255262
"algotrading",
@@ -331,8 +338,8 @@
331338
],
332339
"collective": {
333340
"type": "opencollective",
334-
"url": "https://opencollective.com/ccxt",
335-
"logo": "https://opencollective.com/ccxt/logo.txt"
341+
"url": "https://opencollective.com/octobot",
342+
"logo": "https://opencollective.com/octobot/logo.txt"
336343
},
337344
"ethereum": "0x26a3CB49578F07000575405a57888681249c35Fd",
338345
"dependencies": {

0 commit comments

Comments
 (0)