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 8, 2023
1 parent 6222839 commit 818d17a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 8 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,12 @@ jobs:
cd $GITHUB_WORKSPACE/investool
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-X github.com/axiaoxin-com/investool/version.Version=`TZ=Asia/Shanghai date +'%y%m%d%H%M'`" -o investool_app_mac
sed -i "s/env = \"localhost\"/env = \"prod\"/g" config.toml && tar czvf investool_app_mac.tar.gz investool_app_mac config.toml
if [[ "$(uname)" == "Darwin" ]]; then
sed -i '' 's/env = "localhost"/env = "prod"/' config.toml
else
sed -i "s/env = \"localhost\"/env = \"prod\"/g" config.toml
fi
tar czvf investool_app_mac.tar.gz investool_app_mac config.toml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
29 changes: 22 additions & 7 deletions .github/workflows/qbot-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
with:
draft: true
prerelease: true
tag_name: ${{ github.ref }}
# tag_name: ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -90,6 +90,7 @@ jobs:
needs: release
timeout-minutes: 15
env:
tag_name: v1.0.0
release_name: investool_app_ubuntu_$tag_name
steps:
- name: Checkout code
Expand All @@ -110,7 +111,12 @@ jobs:
- name: Tar [Mac]
run: |
cd $GITHUB_WORKSPACE/investool
sed -i "s/env = \"localhost\"/env = \"prod\"/g" config.toml && tar czvf investool_app_mac.tar.gz investool_app_mac config.toml
if [[ "$(uname)" == "Darwin" ]]; then
sed -i '' 's/env = "localhost"/env = "prod"/' config.toml
else
sed -i "s/env = \"localhost\"/env = \"prod\"/g" config.toml
fi
tar czvf investool_app_mac.tar.gz investool_app_mac config.toml
- name: Build For Linux
run: |
Expand All @@ -119,7 +125,12 @@ jobs:
- name: Tar [Linux]
run: |
cd $GITHUB_WORKSPACE/investool
sed -i "s/env = \"localhost\"/env = \"prod\"/g" config.toml && tar czvf investool_app_linux.tar.gz investool_app_linux config.toml
if [[ "$(uname)" == "Darwin" ]]; then
sed -i '' 's/env = "localhost"/env = "prod"/' config.toml
else
sed -i "s/env = \"localhost\"/env = \"prod\"/g" config.toml
fi
tar czvf investool_app_linux.tar.gz investool_app_linux config.toml
- name: Build For Win
run: |
Expand All @@ -128,7 +139,12 @@ jobs:
- name: Tar [Win]
run: |
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
if [[ "$(uname)" == "Darwin" ]]; then
sed -i '' 's/env = "localhost"/env = "prod"/' config.toml
else
sed -i "s/env = \"localhost\"/env = \"prod\"/g" config.toml
fi
tar czvf investool_app_win.tar.gz investool_app_win config.toml
- name: Create Release
id: create_release
Expand Down Expand Up @@ -173,14 +189,12 @@ jobs:
name: Build Qbot
needs: release
runs-on: ${{ matrix.os }}
# defaults:
# run:
# working-directory: Qbot
strategy:
matrix:
os: [ubuntu-20.04, macos-11.0, windows-2019]
python-version: [3.8]
env:
tag_name: v1.0.0
release_name: qbot_${{ matrix.os}}_$tag_name

steps:
Expand Down Expand Up @@ -232,6 +246,7 @@ jobs:
needs: [qbot_build, investool_app_release, fund_strategy_release]
runs-on: ${{ matrix.os }}
env:
tag_name: v1.0.0
release_name: qbot_${{ matrix.os}}_$tag_name
defaults:
run:
Expand Down

0 comments on commit 818d17a

Please sign in to comment.