diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 81913fa..fcae263 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,52 +1,69 @@ name: Build -on: [push, pull_request] +on: + push: + tags: + - 'v*.*.*' +# Workflow's jobs jobs: - buildwin: - runs-on: windows-latest - steps: - - name: Checkout git repo - uses: actions/checkout@v2 + # job's id + release: + # job's name + name: build and release electron app - - name: Install Node and NPM - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: npm - - - name: Install and build - run: | - npm install - npm run postinstall - npm run package + # the type of machine to run the job on + runs-on: ${{ matrix.os }} - - name: Upload File - uses: actions/upload-artifact@v2 - with: - name: windows - path: release/build/*exe + # create a build matrix for jobs + strategy: + fail-fast: false + matrix: + os: [windows-latest, macos-latest] - buildmac: - runs-on: macos-latest + # create steps steps: + # step1: check out repository - name: Checkout git repo uses: actions/checkout@v2 + # step2: setup node env - name: Install Node and NPM uses: actions/setup-node@v3 with: node-version: 18 cache: npm + # step3: npm install and package - name: Install and build run: | npm install npm run postinstall npm run package - - name: Upload File + # step4: cleanup artifacts in release + - name: Cleanup artifacts for windows + if: matrix.os == 'windows-latest' + run: | + npx rimraf "release/build/!(*.exe)" + + - name: Cleanup artifacts for macos + if: matrix.os == 'macos-latest' + run: | + npx rimraf "release/build/!(*.dmg)" + + # step5: upload artifacts + - name: Upload artifacts uses: actions/upload-artifact@v2 with: - name: mac - path: release/build/*dmg + name: ${{ matrix.os }} + path: release/build + + # step6: create release + - name: Create release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: 'release/build/**' + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 3623f3d..7b68cb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## v1.0.9 + +- electron 版本更新 +- websocket 认证 +- 优化头像存储功能 +- 添加用户 session 配置 + ## v1.0.8 - 添加鼠标穿透功能 @@ -12,47 +19,47 @@ ## v1.0.6 -- electron 版本更新,使用reduxjs/toolkit状态管理,功能优化 +- electron 版本更新,使用 reduxjs/toolkit 状态管理,功能优化 - 移除礼物弹幕过渡动画 - 添加自定义字体功能 - 优化置顶功能 - 优化顶部栏拖动功能 - 优化点击弹幕朗读队列 -- 替换版本号api +- 替换版本号 api ## v1.0.5 - 弹幕翻译已被废弃 -- 修复百度语音TTS返回失败bug +- 修复百度语音 TTS 返回失败 bug ## v1.0.4 - 优化新版粉丝勋章样式 -- 替换版本号api,防止获取版本号失败 -- 修复礼物弹幕图片不显示bug +- 替换版本号 api,防止获取版本号失败 +- 修复礼物弹幕图片不显示 bug ## v1.0.3 - 弹幕列表与礼物列表分开 - 礼物列表拖动定位 -- 优化获取用户头像api访问受限 -- 修复windows下字体文件缺失bug +- 优化获取用户头像 api 访问受限 +- 修复 windows 下字体文件缺失 bug ## v1.0.2 -- 优化config类型 -- 添加ref类型 -- 移除less,使用scss -- 优化socket parseData +- 优化 config 类型 +- 添加 ref 类型 +- 移除 less,使用 scss +- 优化 socket parseData - 添加单元测试 -- 修复maxMessageCount不更新问题 -- 修复mac无法复制粘贴 +- 修复 maxMessageCount 不更新问题 +- 修复 mac 无法复制粘贴 ## v1.0.1 - 优化版本号检查 - win 和 mac 顶部窗口菜单栏保持一致 -- 修复客户端版本号错误bug +- 修复客户端版本号错误 bug - 文档优化 ## v1.0.1-beta.0 diff --git a/package.json b/package.json index d92da9b..e736cb6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bilive-danmaku", "productName": "bilive-danmaku", - "version": "1.0.8", + "version": "1.0.9", "ElectronReactVersion": "1.1.0", "description": "bilibili live danmaku client", "scripts": { diff --git a/release/app/package-lock.json b/release/app/package-lock.json index c68a9c3..ef113a2 100644 --- a/release/app/package-lock.json +++ b/release/app/package-lock.json @@ -1,12 +1,12 @@ { "name": "bilive-danmaku", - "version": "1.0.8", + "version": "1.0.9", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "bilive-danmaku", - "version": "1.0.8", + "version": "1.0.9", "hasInstallScript": true, "license": "MIT" } diff --git a/release/app/package.json b/release/app/package.json index bdbe385..5c27438 100644 --- a/release/app/package.json +++ b/release/app/package.json @@ -1,6 +1,6 @@ { "name": "bilive-danmaku", - "version": "1.0.8", + "version": "1.0.9", "description": "bilibili live danmaku client", "main": "./dist/main/main.js", "author": {