Skip to content

add 126.com

add 126.com #47

Workflow file for this run

name: release exec
on:
push:
tags:
- "v*.*.*"
paths-ignore: # 下列文件的变更不触发部署,可以自行添加
- README.md
- 'py/**'
jobs:
deploy:
runs-on: ${{ matrix.os }} # 使用ubuntu系统镜像运行自动化脚本
permissions:
contents: write
strategy:
matrix:
os: [windows-latest, macos-latest]
steps: # 自动化步骤
- name: check out code
uses: actions/checkout@main # 第一步,下载代码仓库
- name: install node
uses: actions/setup-node@v3
with:
node-version: 16.13.1
#安装依赖
- name: npm
run: npm install
# 打包
- name: package-win
if: startsWith(matrix.os, 'windows')
run: npm run electron:build-win
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: package-mac
if: startsWith(matrix.os, 'macos')
run: npm run electron:build
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# step5: cleanup artifacts in dist_electron
- name: cleanup artifacts for win
if: startsWith(matrix.os, 'windows')
run: |
npx rimraf "dist_electron/!(*.exe)"
- name: cleanup artifacts for mac
if: startsWith(matrix.os, 'macos')
run: |
npx rimraf "dist_electron/!(*.dmg)"
- name: upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}
path: dist_electron
- name: create release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist_electron/**
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
token: ${{ secrets.GITHUB_TOKEN }}
# - name: Deploy to Server # 第二步,rsync推文件(Windows不支持)
# uses: easingthemes/ssh-deploy@main
# env:
# SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_KEY }} # 引用配置,SSH私钥
# ARGS: "-rlgoDzvc -i"
# REMOTE_PORT: "22" # SSH端口
# SOURCE: "dist_electron/" # 要推送的文件夹,路径相对于代码仓库的根目录
# REMOTE_HOST: ${{ secrets.SSH_HOST }} # 引用配置,服务器的host名(IP或者域名domain.com)
# REMOTE_USER: ${{ secrets.SSH_USERNAME }} # 引用配置,服务器登录名
# TARGET: /data/share/${{ matrix.os }}/ # 部署到目标文件夹