Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Build and publish release installers

on:
push:
tags:
- "v*"

permissions:
contents: write

jobs:
build:
name: Build ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
artifact: windows
- os: macos-latest
artifact: macos
- os: ubuntu-latest
artifact: linux

steps:
- name: Check out source and submodules
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install Inno Setup
if: runner.os == 'Windows'
shell: powershell
run: choco install innosetup --no-progress --yes

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install pyinstaller

- name: Build installer
run: python packager.py

- name: Upload installer
uses: actions/upload-artifact@v4
with:
name: installer-${{ matrix.artifact }}
path: packaging/artifacts/*
if-no-files-found: error

release:
name: Publish GitHub Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Download installers
uses: actions/download-artifact@v4
with:
pattern: installer-*
path: release-assets
merge-multiple: true

- name: Create release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: release-assets/*
2 changes: 1 addition & 1 deletion packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def build(*, clean: bool, runtime_dir: Path | None = None, gpu: bool = False) ->
f'Source: "{bundle}\\*"; DestDir: "{{app}}"; Flags: recursesubdirs ignoreversion',
*( [f'Source: "{icon_path}"; DestDir: "{{app}}"; Flags: ignoreversion'] if icon_path else [] ),
"[Icons]",
*( ['Name: "{autoprograms}\\drunkenBot-IDE\\DrunkenBot-LLM-IDE"; Filename: "{app}\\DrunkenBot-LLM-IDE.exe"; IconFilename: "{app}\\drunken_bot_logo_small.ico"'] if icon_path else [] ),
*( [f'Name: "{{autoprograms}}\\{APP_NAME}\\{APP_NAME}"; Filename: "{{app}}\\{APP_NAME}.exe"; IconFilename: "{{app}}\\drunken_bot_logo_small.ico"'] if icon_path else [] ),
*( [f'Name: "{{commondesktop}}\\{APP_NAME}"; Filename: "{{app}}\\{APP_NAME}.exe"; IconFilename: "{{app}}\\drunken_bot_logo_small.ico"'] if icon_path else [] ),
"[Run]",
'Filename: "{app}\\runtime\\Scripts\\python.exe"; Parameters: """{app}\\runtime_setup.py"" --ensure"; WorkingDir: "{app}"; Flags: waituntilterminated; StatusMsg: "Installing hardware runtime. See runtime_setup.log for details..."',
Expand Down
Loading