Skip to content

Commit

Permalink
添加Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
hguandl committed Jun 21, 2023
1 parent 8683c0b commit d5f36eb
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit d5f36eb

Please sign in to comment.