-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add elm327-emulator.exe in the Release folder
- Loading branch information
Showing
4 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters