-
Notifications
You must be signed in to change notification settings - Fork 14
87 lines (73 loc) · 2.65 KB
/
windows_build.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
name: Windows Installer
on:
release:
types: [published]
workflow_dispatch:
push:
concurrency:
group: ci-${{github.workflow}}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: 'windows-latest'
strategy:
matrix:
python-version: ['3.12']
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install -U wheel setuptools pip
python -m pip install -U pywin32 lxml pymavlink pyserial Pillow
python -m pip install -U pyinstaller packaging
- name: Download Inno Setup installer
run: curl -L -o installer.exe http://files.jrsoftware.org/is/6/innosetup-6.3.3.exe
- name: Install Inno Setup
run: ./installer.exe /verysilent /allusers /dir=inst
- name: Build MethodicConfigurator
run: |
python -m pip install . --user
python -m pip list
- name: Prepare installer
run: |
cd MethodicConfigurator
copy ..\\windows\\ardupilot_methodic_configurator.spec
pyinstaller --clean ardupilot_methodic_configurator.spec
del ardupilot_methodic_configurator.spec
- name: Build installer
run: |
cd windows
$env:VERSION=$(python return_version.py)
python return_version.py > version.txt
curl -L -o "c:\program files (x86)\inno setup 6\Languages\ChineseSimplified.isl" https://raw.githubusercontent.com/jrsoftware/issrc/refs/heads/main/Files/Languages/Unofficial/ChineseSimplified.isl
ISCC.exe /dMyAppVersion=$env:VERSION ardupilot_methodic_configurator.iss
ls Output
- name: Archive build
uses: actions/upload-artifact@v4
with:
name: MethodicConfiguratorInstaller
path: windows/Output
retention-days: 7
- name: Pre Release
uses: "marvinpinto/action-automatic-releases@latest"
if: github.ref == 'refs/heads/master'
with:
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
files: windows/Output/*.*
repo_token: "${{ secrets.GITHUB_TOKEN }}"
- name: Release
uses: "marvinpinto/action-automatic-releases@latest"
if: startsWith(github.ref, 'refs/tags/v')
with:
prerelease: false
files: windows/Output/*.*
repo_token: "${{ secrets.GITHUB_TOKEN }}"