Skip to content

更新版本号

更新版本号 #80

Workflow file for this run

name: Build App
permissions:
contents: write
on:
push:
tags:
- v*
jobs:
release:
name: build and release electron app
runs-on: ${{ matrix.os }}
if: startsWith(github.ref, 'refs/tags/')
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
steps:
- name: Check out git repository
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 16
- name: Install Dependencies
run: |
npm i -g pnpm
pnpm install
- name: Build Electron App for windows
if: matrix.os == 'windows-latest'
run: pnpm run build:win
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
- name: Build Electron App for macos
if: matrix.os == 'macos-latest'
run: |
pnpm run build:mac
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
# - name: Build Electron App for linux
# if: matrix.os == 'ubuntu-latest'
# run: |
# pnpm run build:linux
# env:
# GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
- name: Cleanup Artifacts for Windows
if: matrix.os == 'windows-latest'
run: |
npx del-cli "dist/*" "!dist/*.exe" "!dist/*.zip" "!dist/*.yml"
- name: Cleanup Artifacts for MacOS
if: matrix.os == 'macos-latest'
run: |
npx del-cli "dist/*" "!dist/(*.dmg|*.zip|latest*.yml)"
# - name: Cleanup Artifacts for Linux
# if: matrix.os == 'ubuntu-latest'
# run: |
# npx del "dist/*" "!dist/(*.AppImage.*|latest*.yml|*.appimage.*)"
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}
path: dist
- name: release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: 'dist/**'
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}