From d5f36eb4e403e71bad2dfa1d22e1872828c45375 Mon Sep 17 00:00:00 2001 From: Hao Guan <10684225+hguandl@users.noreply.github.com> Date: Mon, 22 May 2023 00:22:16 +1000 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 45 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..71017f89 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,45 @@ +name: Release Bundled Package +on: + push: + tags: + - v* + +jobs: + build: + runs-on: windows-latest + permissions: + contents: write + + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Build Frontend + env: + NODE_OPTIONS: "--openssl-legacy-provider" + working-directory: frontend + run: | + npm install + npm run build + + - name: Export Backend + run: | + pip install -r requirements.txt + pip install pyinstaller + pyinstaller --noconfirm ` + --add-data="data;data" ` + --add-data="log;log" ` + --add-data="frontend\dist;frontend\dist" ` + --name blivechat ` + main.py + + - name: Package Bundle + working-directory: dist + run: 7z a -tzip blivechat.zip blivechat + + - name: Create Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: dist/blivechat.zip