👷 支持github workflow

This commit is contained in:
muwoo 2021-12-15 11:58:11 +08:00
parent 7fc60e2ca8
commit 3a05e13948
7 changed files with 113 additions and 1 deletions

4
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,4 @@
# These are supported funding model platforms
github: #muwoo
custom: ['https://muwoo.github.io/blogs'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

24
.github/ISSUE_TEMPLATE/bug-report.md vendored Normal file
View File

@ -0,0 +1,24 @@
---
name: Bug report
about: 报告一个bug
title: ''
labels: bug
assignees: ''
---
**描述一下这个bug**
清楚而简洁地描述了错误是什么
**复现方式**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**预期行为**
清晰简明地描述了您预期的发生。
**截图**
如果可以,请添加屏幕截图以帮助解释您的问题。

View File

@ -0,0 +1,10 @@
---
name: Development Problem
about: 任何开发建议、使用问题、交流学习都可以
title: ''
labels: help wanted
assignees: ''
---
## 任何开发建议、交流学习都可以

View File

@ -0,0 +1,17 @@
---
name: Feature request
about: 提交一个新特性/功能
title: ''
labels: feature
assignees: ''
---
**您的功能请求是否与问题相关? 请简单描述.**
清晰简明地描述问题是什么. Ex. I'm always frustrated when [...]
**请描述一下您想要的解决方案**
清晰简明地描述您想要发生的事情。
**描述你考虑过的替代方案**
清晰简洁地描述您所考虑的任何替代解决方案或功能。

56
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,56 @@
# main.yml
# Workflow's name
name: Build
# Workflow's trigger
on:
push:
branches:
- master
# Workflow's jobs
jobs:
# job's id
release:
# job's name
name: build and release electron app
# the type of machine to run the job on
runs-on: ${{ matrix.os }}
# create a build matrix for jobs
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-2019]
# create steps
steps:
# step1: check out repository
- name: Check out git repository
uses: actions/checkout@v2
# step2: install node env
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Install system deps
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install libxtst-dev libpng++-dev
sudo apt-get install --no-install-recommends -y icnsutils graphicsmagick xz-utils
# step3: yarn
- name: macos Yarn install
if: ${{runner.os == 'macOS'}}
run: |
yarn
yarn global add xvfb-maybe
- name: Build & release app
run: |
npm run release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}

View File

@ -9,6 +9,7 @@
"feature:dev": "cd feature & npm run serve",
"electron:build": "vue-cli-service electron:build",
"electron:serve": "vue-cli-service electron:serve",
"release": "vue-cli-service electron:serve",
"postinstall": "electron-builder install-app-deps",
"postuninstall": "electron-builder install-app-deps"
},

View File

@ -48,7 +48,7 @@ export default () => {
view.setBounds({ x: 0, y: 60, width: 800, height: 600 });
view.setAutoResize({ width: true });
window.setSize(800, 660);
view.webContents.openDevTools();
commonConst.dev() && view.webContents.openDevTools();
executeHooks("PluginEnter", plugin.ext);
executeHooks("PluginReady", plugin.ext);
window.webContents.executeJavaScript(`window.pluginLoaded()`);