This repository has been archived by the owner on Feb 24, 2024. It is now read-only.
chore: release 0.1.4 #87
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: | |
- main | |
paths-ignore: | |
- '**.md' | |
- '.vscode' | |
- 'assets' | |
- 'respack' | |
- '.github/workflows/release.yml' | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node: ['20'] | |
os: ['windows-latest', 'ubuntu-latest', 'macos-latest'] | |
# arch: ['amd64', 'arm64'] | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NODE_OPTIONS: '--max_old_space_size=16384' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: latest | |
- name: Use Node.js ${{ matrix.node }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: 'pnpm' | |
- name: Download MAA | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
repo: MaaAssistantArknights/MaaFramework | |
workflow: ci.yml | |
workflow_conclusion: success | |
path: maa-cache | |
name: MAA-${{ matrix.os == 'windows-latest' && 'win' || (matrix.os == 'ubuntu-latest' && 'linux' || 'macos') }}-x86_64 | |
- name: Download MaaAgentBinary | |
run: git clone https://github.com/MaaAssistantArknights/MaaAgentBinary.git --depth=1 | |
- name: Install dependencies | |
run: pnpm i | |
- name: Compile Electron app | |
run: | | |
pnpm run build | |
pnpm run package | |
mkdir -p pkg | |
cp -r MaaAgentBinary ./out/`ls out`/ | |
cp -r maa-cache/bin ./out/`ls out`/maa | |
cp init/*.json ./out/`ls out`/ | |
- name: Package app | |
run: | | |
tar cjvf pkg/`ls out`.tar.gz -C ./out ./`ls out` | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
# name: maa-y-${{ matrix.os }}-${{ matrix.arch }} | |
name: maa-y-${{ matrix.os == 'windows-latest' && 'win' || (matrix.os == 'ubuntu-latest' && 'linux' || 'macos') }} | |
path: 'pkg' |