发布v2.5.0 #73
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@v3 | |
# - name: Install Node.js | |
# uses: actions/setup-node@v3 | |
# with: | |
# node-version: '16' | |
# - name: Cache file | |
# uses: actions/cache@v3 | |
# 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 | |
# needs: CheckCode | |
steps: | |
- name: Check out git repository | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Cache file | |
uses: actions/cache@v3 | |
with: | |
path: | | |
node_modules | |
%APPDATA%\npm-cache | |
%LOCALAPPDATA%\electron\Cache | |
%LOCALAPPDATA%\electron-builder\Cache | |
key: ${{ runner.os }}-build-caches-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build- | |
- name: Install Dependencies | |
run: | | |
npm ci | |
- name: Build src code | |
run: npm run build | |
- name: Release package | |
run: | | |
npm run publish:win:7z:x64:always | |
npm run publish:win:setup:arm64 | |
npm run publish:win:setup:x64 | |
npm install electron@22 | |
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 | |
# needs: CheckCode | |
steps: | |
- name: Check out git repository | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Cache file | |
uses: actions/cache@v3 | |
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: Build src code | |
run: npm run build | |
- name: Release package | |
run: | | |
npm run publish:mac:dmg:always | |
npm run publish:mac:dmg:arm64 | |
env: | |
ELECTRON_CACHE: $HOME/.cache/electron | |
ELECTRON_BUILDERCACHE: $HOME/.cache/electron-builder | |
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 | |
# 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@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Cache file | |
uses: actions/cache@v3 | |
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: Build src code | |
run: npm run build | |
- name: Release package | |
run: | | |
npm run publish:linux:deb:amd64:always | |
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 |