Skip to content

v0.5.6

v0.5.6 #31

Workflow file for this run

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: MacOS CI
on:
release:
types: [published]
workflow_dispatch:
jobs:
build:
if: "!github.event.release.prerelease"
runs-on: macOS-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm
run: |
npm ci
npm run-script package-darwin
- name: cmake
run: |
git submodule update --init --recursive
mkdir bin
mkdir bin/release
cd bin/release
cmake ../.. -DCMAKE_BUILD_TYPE=Release
make -j
- name: collect
run: |
cp -r dist/MajsoulPaipuCrawler-darwin-x64 result
cp bin/release/PaipuAnalyzer result/
cp bin/release/PaipuAnalyzer ./
cp config.json result/
cp PAADData.json result/
cp doc/README.txt result/
cp doc/release-notes.txt result/
cp -r i18n result/
mv result MajsoulPaipuAnalyzer-macos
# ln -s "~/Library/Application Support/MajsoulPaipuAnalyzer/data" result/data
- name: archive
run: |
brew install p7zip
7z a MajsoulPaipuAnalyzer-macos.7z MajsoulPaipuAnalyzer-macos -m0=LZMA2 -mmt
7z a PaipuAnalyzer.zip PaipuAnalyzer
- uses: actions/upload-artifact@v4
with:
name: MajsoulPaipuAnalyzer-macos.7z
path: MajsoulPaipuAnalyzer-macos.7z
- uses: actions/upload-artifact@v4
with:
name: PaipuAnalyzer
path: PaipuAnalyzer.zip
- name: Upload to release
if: github.event_name != 'workflow_dispatch'
run: |
cp .github/asset.js .
node asset.js ${{ secrets.ACCESS_TOKEN }} $GITHUB_EVENT_PATH $GITHUB_REPOSITORY MajsoulPaipuAnalyzer-macos.7z application/octet_stream