Skip to content

Create FUNDING.yml

Create FUNDING.yml #82

Workflow file for this run

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