Skip to content

Commit

Permalink
ci: qbot release test
Browse files Browse the repository at this point in the history
  • Loading branch information
Charmve committed Oct 7, 2023
1 parent 9ee5666 commit 64b6222
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 12 deletions.
57 changes: 45 additions & 12 deletions .github/workflows/qbot-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,27 @@ jobs:
cd $GITHUB_WORKSPACE/investool
sed -i "s/env = \"localhost\"/env = \"prod\"/g" config.toml && tar czvf investool_app_win.tar.gz investool_app_win config.toml
# - name: Upload assets
# id: upload-release-asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ needs.release.outputs.upload_url }}
# asset_path: $GITHUB_WORKSPACE/investool/investool_app_mac.tar.gz
# asset_name: investool_app_mac.tar.gz
# asset_content_type: application/gzip
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload assets
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: $GITHUB_WORKSPACE/investool/investool_app_mac.tar.gz
asset_name: investool_app_mac.tar.gz
asset_content_type: application/gzip

# - name: SCP Files
# uses: appleboy/scp-action@master
Expand Down Expand Up @@ -180,7 +191,7 @@ jobs:
release_name: qbot_${{ matrix.os}}_$tag_name

steps:
- name: Set up Python ${{ matrix.python-version }}
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -196,12 +207,23 @@ jobs:
- name: Build
run: |
pyinstaller -F -w --clean main.py -n qbot --icon=./gui/imgs/logo.ico
pyinstaller -F -w --clean --add-data gui/bkt_result/bkt_result.html;gui/imgs/wechat.png main.py -n qbot --icon=./gui/imgs/logo.ico
- name: Package
working-directory: .
run: |
tar -zcvf ${release_name}.tar.gz ./dist
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload assets
id: upload-release-asset
Expand Down Expand Up @@ -235,6 +257,17 @@ jobs:
mv *.tar.gz *.zip qbot_${{ matrix.os }}_release
tar -zcvf qbot_${{ matrix.os }}_release_${release_name}.tar.gz qbot_${{ matrix.os }}_release/*
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload assets
id: upload-release-asset
uses: actions/upload-release-asset@v1
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@

<!-- <img src="https://user-images.githubusercontent.com/29084184/204598632-23c473db-92ee-4e9b-9b57-d6d95c861fdf.png" width="42"/> -->

![releases](https://img.shields.io/github/downloads/UFund-Me/Qbot/total) <code>since Sep 26</code>

<p align="left">
<img alt="ViewCount" src="https://views.whatilearened.today/views/github/UFund-Me/Qbot.svg">
<a href='https://github.com/MShawon/github-clone-count-badge'><img alt='GitHub Clones' src='https://img.shields.io/badge/dynamic/json?color=success&label=Clone&query=count&url=https://gist.githubusercontent.com/MShawon/cf89f3274d06170b8a4973039aa6220a/raw/clone.json&logo=github'></a>
</p>

[![CodeQL](https://github.com/UFund-Me/Qbot/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/UFund-Me/Qbot/actions/workflows/codeql-analysis.yml)
[![AutoTrade](https://github.com/UFund-Me/Qbot/actions/workflows/auto-trade.yml/badge.svg)](https://github.com/UFund-Me/Qbot/actions/workflows/auto-trade.yml)
[![Pylint](https://github.com/UFund-Me/Qbot/actions/workflows/pylint.yml/badge.svg)](https://github.com/UFund-Me/Qbot/actions/workflows/pylint.yml)
Expand Down

0 comments on commit 64b6222

Please sign in to comment.