发布v2.6.0 #76
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
# CheckCode: | |
# name: Lint Code | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Check out git repository | |
# uses: actions/checkout@v4 | |
# - name: Install Node.js | |
# uses: actions/setup-node@v4 | |
# with: | |
# node-version: '16' | |
# - name: Cache file | |
# uses: actions/cache@v4 | |
# with: | |
# path: | | |
# node_modules | |
# $HOME/.cache/electron | |
# $HOME/.cache/electron-builder | |
# $HOME/.npm/_prebuilds | |
# key: ${{ runner.os }}-build-caches-${{ hashFiles('**/package-lock.json') }} | |
# restore-keys: | | |
# ${{ runner.os }}-build- | |
# - name: Install Dependencies | |
# run: | | |
# npm ci | |
# - name: Lint src code | |
# run: npm run lint | |
Windows: | |
name: Windows | |
runs-on: windows-latest | |
env: | |
NPM_CACHE: '%APPDATA%\npm-cache' | |
ELECTRON_CACHE: '%LOCALAPPDATA%\electron\Cache' | |
ELECTRON_BUILDERCACHE: '%LOCALAPPDATA%\electron-builder\Cache' | |
# needs: CheckCode | |
steps: | |
- name: Check out git repository | |
uses: actions/checkout@v4 | |
- name: Setup Node Env | |
uses: ./.github/actions/setup | |
- name: Build src code | |
run: npm run build | |
- name: Release package | |
run: | | |
npm run publish:win:7z:x64 | |
npm run publish:win:7z:arm64 | |
npm run publish:win:setup:arm64 | |
npm run publish:win:setup:x64 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BT_TOKEN: ${{ secrets.BT_TOKEN }} | |
- name: Generate file MD5 | |
run: | | |
cd build | |
Get-FileHash *.exe,*.7z -Algorithm MD5 | Format-List | |
Windows_7: | |
name: Windows | |
runs-on: windows-latest | |
env: | |
NPM_CACHE: '%APPDATA%\npm-cache' | |
ELECTRON_CACHE: '%LOCALAPPDATA%\electron\Cache' | |
ELECTRON_BUILDERCACHE: '%LOCALAPPDATA%\electron-builder\Cache' | |
# needs: CheckCode | |
steps: | |
- name: Check out git repository | |
uses: actions/checkout@v4 | |
- name: Setup Node Env | |
uses: ./.github/actions/setup | |
- name: Build src code | |
run: npm run build | |
- name: Prepare win7 electron env | |
run: | | |
npm install electron@22 | |
pip.exe install setuptools | |
- name: Release win7 package | |
run: | | |
npm run publish:win7:setup:x64 | |
npm run publish:win7:7z:x64 | |
npm run publish:win7:7z:x86 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BT_TOKEN: ${{ secrets.BT_TOKEN }} | |
- name: Generate file MD5 | |
run: | | |
cd build | |
Get-FileHash *.exe,*.7z -Algorithm MD5 | Format-List | |
Mac: | |
name: Mac | |
runs-on: macos-latest | |
env: | |
NPM_CACHE: $HOME/.npm | |
ELECTRON_CACHE: $HOME/.cache/electron | |
ELECTRON_BUILDERCACHE: $HOME/.cache/electron-builder | |
# needs: CheckCode | |
steps: | |
- name: Check out git repository | |
uses: actions/checkout@v4 | |
- name: Install python3 setuptools | |
run: python3 -m pip install setuptools | |
- name: Setup Node Env | |
uses: ./.github/actions/setup | |
- name: Build src code | |
run: npm run build | |
- name: Release package | |
run: | | |
npm run publish:mac:dmg | |
npm run publish:mac:dmg:arm64 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BT_TOKEN: ${{ secrets.BT_TOKEN }} | |
- name: Generate file MD5 | |
run: | | |
cd build | |
md5 *.dmg | |
Linux: | |
name: Linux | |
runs-on: ubuntu-latest | |
env: | |
NPM_CACHE: $HOME/.npm | |
ELECTRON_CACHE: $HOME/.cache/electron | |
ELECTRON_BUILDERCACHE: $HOME/.cache/electron-builder | |
# needs: CheckCode | |
steps: | |
- name: Install package | |
run: sudo apt-get update && sudo apt-get install -y rpm libarchive-tools | |
- name: Check out git repository | |
uses: actions/checkout@v4 | |
- name: Setup Node Env | |
uses: ./.github/actions/setup | |
- name: Build src code | |
run: npm run build | |
- name: Release package | |
run: | | |
npm run publish:linux:deb:amd64 | |
npm run publish:linux:deb:arm64 | |
npm run publish:linux:deb:armv7l | |
npm run publish:linux:appImage | |
npm run publish:linux:rpm | |
npm run publish:linux:pacman | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BT_TOKEN: ${{ secrets.BT_TOKEN }} | |
- name: Generate file MD5 | |
run: | | |
cd build | |
md5sum *.deb *.rpm *.pacman *.AppImage |