2.7.0 #83
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, pull_request] | |
jobs: | |
build: | |
name: Build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, ubuntu-latest, macos-13] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '18.17.1' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Get npm cache directory | |
id: npm-cache | |
run: | | |
echo "::set-output name=dir::$(npm config get cache)" | |
- uses: actions/cache@v2 | |
with: | |
path: ${{ steps.npm-cache.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Windows build | |
if: ${{ matrix.os == 'windows-latest' }} | |
shell: cmd | |
run: | | |
call .\app\script\build.bat | |
- name: Linux build | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
shell: bash | |
run: | | |
chmod +x ./app/script/build.sh | |
./app/script/build.sh | |
- name: macOS build | |
if: ${{ contains(matrix.os, 'macos') }} | |
shell: bash | |
run: | | |
chmod +x ./app/script/build.sh | |
./app/script/build.sh | |
- name: Get assets | |
if: ${{ startsWith(github.event.ref, 'refs/tags') }} | |
run: cd app&&npm run get&&cd .. | |
env: | |
MISHIRO_NO_PROGRESS: '1' | |
- name: Pack x64 | |
if: ${{ startsWith(github.event.ref, 'refs/tags') }} | |
run: cd app&&npm run pack:x64&&cd .. | |
- name: Pack ia32 | |
if: ${{ startsWith(github.event.ref, 'refs/tags') && matrix.os == 'windows-latest' }} | |
run: cd app&&npm run pack:ia32&&cd .. | |
- name: Create release | |
if: ${{ startsWith(github.event.ref, 'refs/tags') }} | |
uses: toyobayashi/upload-release-assets@v3.0.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.event.after }} | |
release_name: ${{ github.event.after }} | |
draft: true | |
prerelease: false | |
assets: | | |
./dist/*.zip | |
./dist/*.deb | |
./dist/*.exe |