删除了暂时没有用处的 Yarn 2 缓存 #47
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: 构建 Tauri 桌面版本 | |
on: | |
- push | |
- workflow_dispatch | |
jobs: | |
build-tauri: | |
name: 构建 Tauri 桌面版本 | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [macos-latest, ubuntu-20.04, windows-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: 克隆仓库源代码 | |
uses: actions/checkout@v2.3.4 | |
with: | |
submodules: recursive | |
path: amll-ttml-tool | |
- name: 克隆 AMLL 仓库源代码 | |
uses: actions/checkout@v2.3.4 | |
with: | |
repository: Steve-xmh/applemusic-like-lyrics | |
ref: 3.0-dev | |
submodules: recursive | |
path: applemusic-like-lyrics | |
- name: 配置 NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: 安装 Rust 工具链 | |
uses: dtolnay/rust-toolchain@stable | |
- name: 安装 wasm-pack | |
uses: jetli/wasm-pack-action@v0.4.0 | |
with: | |
version: latest | |
- name: 安装 Tauri 所需系统依赖(仅 Linux) | |
if: matrix.platform == 'ubuntu-20.04' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf | |
- name: AMLL - 安装依赖 | |
run: yarn | |
working-directory: applemusic-like-lyrics | |
- name: AMLL - 构建 Core 模块 | |
run: yarn build | |
working-directory: applemusic-like-lyrics/packages/core | |
- name: AMLL - 构建 Vue 模块 | |
run: yarn build | |
working-directory: applemusic-like-lyrics/packages/vue | |
- name: AMLL - 构建 TTML 模块 | |
run: yarn build | |
working-directory: applemusic-like-lyrics/packages/ttml | |
- name: AMLL - 构建 WS Protocol 模块 | |
run: wasm-pack build --target bundler --release --scope applemusic-like-lyrics | |
working-directory: applemusic-like-lyrics/packages/ws-protocol | |
- name: AMLL - 构建 Lyric 模块 | |
run: wasm-pack build --target bundler --release --scope applemusic-like-lyrics | |
working-directory: applemusic-like-lyrics/packages/lyric | |
- name: 安装前端依赖 | |
run: yarn install | |
working-directory: amll-ttml-tool | |
env: | |
YARN_ENABLE_IMMUTABLE_INSTALLS: false | |
- name: 构建 Tauri 程序 | |
uses: tauri-apps/tauri-action@v0 | |
with: | |
projectPath: amll-ttml-tool | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: 上传产物到 Action Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: AMLL TTML Tool ${{runner.os}}-${{runner.arch}} | |
path: | | |
amll-ttml-tool/src-tauri/target/release/bundle/deb/*.deb | |
amll-ttml-tool/src-tauri/target/release/bundle/appimage/*.AppImage | |
amll-ttml-tool/src-tauri/target/release/bundle/appimage/*.AppImage.tar.gz | |
amll-ttml-tool/src-tauri/target/release/bundle/msis/*.exe | |
amll-ttml-tool/src-tauri/target/release/bundle/msi/*.msi | |
amll-ttml-tool/src-tauri/target/release/bundle/dmg/*.dmg | |
amll-ttml-tool/src-tauri/target/release/bundle/macos/*.app | |
amll-ttml-tool/src-tauri/target/release/bundle/macos/*.app.tar.gz |