Skip to content

发布 v2.9.0

发布 v2.9.0 #82

Workflow file for this run

name: Build
on:
push:
branches:
- master
env:
IS_CI: 'true'
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: 20
# - 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
# needs: CheckCode
steps:
- name: Check out git repository
uses: actions/checkout@v4
- name: Get npm cache directory
shell: pwsh
run: echo "NPM_CACHE=$(npm config get cache)" >> $env:GITHUB_ENV
- name: Show Env
run: echo "${{ env.NPM_CACHE }}"
- name: Setup Node Env
env:
NPM_CACHE: ${{ env.NPM_CACHE }}
uses: ./.github/actions/setup
- name: Build src code
run: |
git status --porcelain
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_7
runs-on: windows-latest
# needs: CheckCode
steps:
- name: Check out git repository
uses: actions/checkout@v4
- name: Get npm cache directory
shell: pwsh
run: echo "NPM_CACHE=$(npm config get cache)" >> $env:GITHUB_ENV
- name: Setup Node Env
env:
NPM_CACHE: ${{ env.NPM_CACHE }}
uses: ./.github/actions/setup
- name: Build src code
run: |
git status --porcelain
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
# needs: CheckCode
steps:
- name: Check out git repository
uses: actions/checkout@v4
- name: Install python3 setuptools
run: |
mkdir ~/.venv
python3 -m venv ~/.venv
source ~/.venv/bin/activate
python3 -m pip install setuptools
- name: Get npm cache directory
shell: bash
run: echo "NPM_CACHE=$(npm config get cache)" >> $GITHUB_ENV
- name: Show Env
run: echo "${{ env.NPM_CACHE }}"
- name: Setup Node Env
env:
NPM_CACHE: ${{ env.NPM_CACHE }}
uses: ./.github/actions/setup
- name: Build src code
run: |
git status --porcelain
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
# 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: Get npm cache directory
shell: bash
run: echo "NPM_CACHE=$(npm config get cache)" >> $GITHUB_ENV
- name: Show Env
run: echo "${{ env.NPM_CACHE }}"
- name: Setup Node Env
env:
NPM_CACHE: ${{ env.NPM_CACHE }}
uses: ./.github/actions/setup
- name: Build src code
run: |
git status --porcelain
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