This repository has been archived by the owner on Feb 24, 2024. It is now read-only.
chore: add some init data #9
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: | |
- '.vscode' | |
- 'assets' | |
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 | |
- name: Use Node.js ${{ matrix.node }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Download MaaAgentBinary | |
run: git clone https://github.com/MaaAssistantArknights/MaaAgentBinary.git --depth=1 | |
- name: Install dependencies | |
run: npm ci | |
- name: Compile Electron app | |
run: | | |
npm run build | |
npm run package | |
mkdir -p pkg | |
cp -r MaaAgentBinary ./out/`ls out`/ | |
cp -r assets ./out/`ls out`/ | |
mkdir ./out/`ls out`/maa | |
touch "./out/`ls out`/maa/PUT_MaaRpcCli_HERE" | |
cp initcfg.json ./out/`ls out`/config.json | |
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 }} | |
path: 'pkg' |