From 7e8d18a3f72b36f56d122a796af7896d2ba9a915 Mon Sep 17 00:00:00 2001 From: yuudi Date: Wed, 21 Oct 2020 18:41:22 +0800 Subject: [PATCH] chore: auto build --- .github/workflows/docker-build.yml | 6 ++--- .github/workflows/windows-exe-build.yml | 33 +++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/windows-exe-build.yml diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index e25c2758..c68f92d0 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -6,15 +6,15 @@ on: jobs: build: - runs-on: ubuntu-latest - name: auto build + runs-on: ubuntu-18.04 + name: auto build docker steps: - name: Checkout code uses: actions/checkout@v2 - name: Build image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v1 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_ACCESSTOKEN }} diff --git a/.github/workflows/windows-exe-build.yml b/.github/workflows/windows-exe-build.yml new file mode 100644 index 00000000..58140bb8 --- /dev/null +++ b/.github/workflows/windows-exe-build.yml @@ -0,0 +1,33 @@ +name: windows-exe-build + +on: + release: + types: [created] + +jobs: + build: + runs-on: windows-2019 + name: auto build windows binary + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Build exe binary and archive + shell: cmd + run: | + cd .\src\client + pip install pyinstaller + pip install -r requirements.txt + pyinstaller main.spec + 7z a yobot-windows64.zip .\dist\yobot.exe + + - name: Upload Release Asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./src/client/dist/yobot-windows64.zip + asset_name: yobot-windows64.zip + asset_content_type: application/zip