-
Notifications
You must be signed in to change notification settings - Fork 4
101 lines (88 loc) · 2.55 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Workflow's name
name: Build ArchOctopus For Win/Mac
## Workflow's trigger
#on:
# push:
# tags:
# - "v*"
# 手动触发测试
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'debug'
version:
description: 'release version'
required: true
# Workflow's jobs
jobs:
# job's id
release:
# job's name
name: build and release archoctopus 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: [windows-latest, macos-latest]
# create steps
steps:
# step1: check out repository
- name: Check out git repository
uses: actions/checkout@v3
with:
ref: dev
# step2: set up python
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: "3.8"
cache: 'pip'
# step3: install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade wheel
python -m pip install --upgrade pyinstaller
# step4: build app for mac/win
- name: build mac app
if: matrix.os == 'macos-latest'
run: |
pip install -r requirements-dev-osx.txt
source ./release/build-osx/build.sh
- name: Install NSIS for win
if: matrix.os == 'windows-latest'
run: |
iwr -useb get.scoop.sh -outfile 'install.ps1'
.\install.ps1 -RunAsAdmin
scoop update
scoop bucket add extras
scoop install nsis
- name: build windows app
if: matrix.os == 'windows-latest'
run: |
pip install -r requirements-dev-msw.txt
echo ${{ github.ref }}
.\release\build-msw\build.bat ${{ github.event.inputs.version }}
# # step5: create release
# - name: release
# uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/')
# with:
# files: "dist_electron/**"
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# step6: ftp upload
- name: Simple FTP upload
uses: dennisameling/[email protected]
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
local_dir: ./release/dist/
server_dir: ./app/release/
secure: false