-
Notifications
You must be signed in to change notification settings - Fork 91
58 lines (49 loc) · 1.74 KB
/
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
name: Build Workflow for elm327-emulator.exe/zip
on:
push:
tags:
- "v*.*.*"
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Git Checkout
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
architecture: 'x64'
- name: Install Python Requirements
run: |
python -m pip install --upgrade pip
#pip install git+https://github.com/pyinstaller/pyinstaller@develop
pip install pyinstaller
pip install .
- name: Create wrapper
run: |
echo "import sys
from elm import main
sys.exit(main())" > elm327-emulator.py
shell: pwsh
- name: Run PyInstaller to produce the exe file
run: |
python -m PyInstaller --onefile elm327-emulator.py --name elm327-emulator --collect-all elm
- name: Zip the elm327-emulator.exe asset to elm327-emulator.zip
run: |
Compress-Archive dist/elm327-emulator.exe dist/elm327-emulator.zip
shell: pwsh
- name: Generate Changelog
run: >
echo "The *elm327-emulator.exe* executable file in the
*elm327-emulator.zip* archive within the assets below is
auto-generated by a [GitHub Action](.github/workflows/build.yml)."
> ${{ github.workspace }}-CHANGELOG.txt
- name: Create Release, uploading the elm327-emulator.zip asset
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
body_path: ${{ github.workspace }}-CHANGELOG.txt
files: dist/elm327-emulator.zip
append_body: true
generate_release_notes: true