Skip to content

Commit a7deb25

Browse files
harrypmoz-agent
andcommitted
Add ARM builds and fix GitHub Actions deprecation notices
Expand portable binary builds to Linux/Windows ARM and macOS universal outputs, parameterize AppImage arch handling, update docs, and upgrade workflow actions to current majors to address Node runtime deprecation warnings. Co-Authored-By: Oz <oz-agent@warp.dev>
1 parent 01fe856 commit a7deb25

3 files changed

Lines changed: 115 additions & 38 deletions

File tree

.github/workflows/build-binaries.yml

Lines changed: 48 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20,56 +20,77 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
include:
23-
- target: linux-appimage
23+
- target: linux-appimage-x86_64
24+
platform: linux
2425
os: ubuntu-22.04
25-
artifact_name: ia-interact-linux-appimage
26+
linux_appimage_arch: x86_64
27+
artifact_name: ia-interact-linux-x86_64-appimage
2628
artifact_path: release/ia-interact-linux-x86_64.AppImage
27-
- target: windows-exe
29+
- target: linux-appimage-aarch64
30+
platform: linux
31+
os: ubuntu-24.04-arm
32+
linux_appimage_arch: aarch64
33+
artifact_name: ia-interact-linux-aarch64-appimage
34+
artifact_path: release/ia-interact-linux-aarch64.AppImage
35+
- target: windows-exe-x86_64
36+
platform: windows
2837
os: windows-latest
29-
artifact_name: ia-interact-windows-exe
38+
windows_arch_suffix: x86_64
39+
artifact_name: ia-interact-windows-x86_64-exe
3040
artifact_path: release/ia-interact-windows-x86_64.exe
31-
- target: macos-app
32-
os: macos-13
33-
artifact_name: ia-interact-macos-app
34-
artifact_path: release/ia-interact-macos.app.zip
35-
defaults:
36-
run:
37-
shell: bash
41+
- target: windows-exe-arm64
42+
platform: windows
43+
os: windows-11-arm
44+
windows_arch_suffix: arm64
45+
artifact_name: ia-interact-windows-arm64-exe
46+
artifact_path: release/ia-interact-windows-arm64.exe
47+
- target: macos-app-universal
48+
platform: macos
49+
os: macos-14
50+
artifact_name: ia-interact-macos-universal-app
51+
artifact_path: release/ia-interact-macos-universal.app.zip
3852
steps:
3953
- name: Checkout
40-
uses: actions/checkout@v4
54+
uses: actions/checkout@v6
4155

4256
- name: Set up Python
43-
uses: actions/setup-python@v5
57+
uses: actions/setup-python@v6
4458
with:
4559
python-version: "3.11"
46-
47-
- name: Install build dependencies
60+
- name: Install build dependencies (Linux/macOS)
61+
if: matrix.platform != 'windows'
62+
run: |
63+
python -m pip install --upgrade pip
64+
python -m pip install -r requirements-build.txt
65+
- name: Install build dependencies (Windows)
66+
if: matrix.platform == 'windows'
67+
shell: pwsh
4868
run: |
4969
python -m pip install --upgrade pip
5070
python -m pip install -r requirements-build.txt
5171
- name: Build Linux AppImage
52-
if: matrix.target == 'linux-appimage'
72+
if: matrix.platform == 'linux'
5373
run: |
5474
chmod +x scripts/build-appimage.sh
55-
scripts/build-appimage.sh
75+
APPIMAGE_ARCH=${{ matrix.linux_appimage_arch }} scripts/build-appimage.sh
5676
5777
- name: Build Windows .exe
58-
if: matrix.target == 'windows-exe'
78+
if: matrix.platform == 'windows'
79+
shell: pwsh
5980
run: |
6081
pyinstaller --clean --onefile --name ia-interact ia-interact.py
61-
mkdir -p release
62-
cp dist/ia-interact.exe release/ia-interact-windows-x86_64.exe
82+
New-Item -ItemType Directory -Path release -Force | Out-Null
83+
Copy-Item dist/ia-interact.exe "release/ia-interact-windows-${{ matrix.windows_arch_suffix }}.exe"
6384
64-
- name: Build macOS .app bundle archive
65-
if: matrix.target == 'macos-app'
85+
- name: Build macOS universal .app bundle archive
86+
if: matrix.platform == 'macos'
6687
run: |
67-
pyinstaller --clean --onedir --windowed --name ia-interact ia-interact.py
88+
pyinstaller --clean --onedir --windowed --target-architecture universal2 --name ia-interact ia-interact.py
6889
mkdir -p release
69-
ditto -c -k --sequesterRsrc --keepParent dist/ia-interact.app release/ia-interact-macos.app.zip
90+
ditto -c -k --sequesterRsrc --keepParent dist/ia-interact.app release/ia-interact-macos-universal.app.zip
7091
7192
- name: Upload portable artifact
72-
uses: actions/upload-artifact@v4
93+
uses: actions/upload-artifact@v7
7394
with:
7495
name: ${{ matrix.artifact_name }}
7596
path: ${{ matrix.artifact_path }}
@@ -85,15 +106,15 @@ jobs:
85106
contents: write
86107
steps:
87108
- name: Download artifacts
88-
uses: actions/download-artifact@v4
109+
uses: actions/download-artifact@v8
89110
with:
90111
path: release-assets
91112

92113
- name: Show release assets
93114
run: find release-assets -type f
94115

95116
- name: Attach assets to GitHub Release
96-
uses: softprops/action-gh-release@v2
117+
uses: softprops/action-gh-release@v3
97118
with:
98119
files: |
99120
release-assets/**/*.AppImage

README.md

Lines changed: 46 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ Use this script to list files, upload files, download files, delete files, move
1717
- [2. Setting Up the Script](#2-setting-up-the-script)
1818
- [3. Installing Python Libraries](#3-installing-python-libraries)
1919
- [4. Configuring Environment Variables](#4-configuring-environment-variables)
20+
- [5. Build Local Portable Binaries](#5-build-local-portable-binaries)
21+
- [6. GitHub Actions: Portable Releases](#6-github-actions-portable-releases)
22+
- [7. Windows Python Mode Notes (from issue #1)](#7-windows-python-mode-notes-from-issue-1)
2023
- [Usage](#usage)
2124
- [Running the Script](#running-the-script)
2225
- [Script Options](#script-options)
@@ -154,28 +157,64 @@ The binary will be output to:
154157
On Windows, the file will be:
155158

156159
dist/ia-interact.exe
157-
Build a Linux `.AppImage`:
160+
161+
Build a Linux `.AppImage` (x86_64):
158162

159163
chmod +x scripts/build-appimage.sh
160164
./scripts/build-appimage.sh
161-
162-
The AppImage will be output to:
165+
The x86_64 AppImage will be output to:
163166

164167
release/ia-interact-linux-x86_64.AppImage
165168

166-
# GitHub Actions: Portable Releases
169+
Build a Linux `.AppImage` (arm64):
170+
171+
APPIMAGE_ARCH=aarch64 ./scripts/build-appimage.sh
172+
173+
The arm64 AppImage will be output to:
174+
175+
release/ia-interact-linux-aarch64.AppImage
176+
### 6. GitHub Actions: Portable Releases
167177

168178
This repository includes:
169179

170180
.github/workflows/build-binaries.yml
171181

172182
The workflow builds portable release artifacts for:
173-
- Linux: `.AppImage`
174-
- Windows: `.exe`
175-
- macOS: `.app` packaged as `.app.zip`
183+
- Linux x86_64: `ia-interact-linux-x86_64.AppImage`
184+
- Linux arm64: `ia-interact-linux-aarch64.AppImage`
185+
- Windows x86_64: `ia-interact-windows-x86_64.exe`
186+
- Windows arm64: `ia-interact-windows-arm64.exe`
187+
- macOS universal (arm64 + x86_64): `ia-interact-macos-universal.app.zip`
176188

177189
Each run uploads these as workflow artifacts.
178190
When you push a tag matching `v*` (for example `v1.0.0`), the workflow also publishes these files to the GitHub Release for that tag.
191+
### 7. Windows Python Mode Notes (from issue #1)
192+
Issue reference: `https://github.com/harrypm/IA-Interact/issues/1`
193+
194+
The issue confirms the script can be run directly on Windows with Python.
195+
196+
Recommended flow:
197+
1. Install Python on Windows and enable **Add Python to PATH** during install.
198+
2. Open `cmd` in the folder containing `ia-interact.py` (File Explorer address bar -> type `cmd`).
199+
3. Install dependencies:
200+
201+
python -m pip install requests tqdm
202+
203+
4. Run the tool:
204+
205+
python -m ia-interact
206+
207+
Alternative:
208+
209+
python ia-interact.py
210+
211+
5. Configure S3 keys before use (recommended: environment variables rather than hardcoding keys in the script).
212+
- The issue notes also mention replacing `os.getenv("S3_ACCESS_KEY")` and `os.getenv("S3_SECRET_KEY")` inline in the script.
213+
- If you do that for troubleshooting, keep it local-only and do not commit secrets.
214+
215+
Large upload note from the issue:
216+
- In the upload flow, choosing **new folder** is more reliable for large uploads.
217+
- Using existing folder with `./` may return a `400` error.
179218

180219

181220
# Usage

scripts/build-appimage.sh

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,25 @@ DIST_DIR="$ROOT_DIR/dist"
66
BUILD_DIR="$ROOT_DIR/build"
77
RELEASE_DIR="$ROOT_DIR/release"
88
APPDIR="$ROOT_DIR/AppDir"
9-
APPIMAGE_TOOL="$ROOT_DIR/appimagetool-x86_64.AppImage"
10-
OUTPUT_APPIMAGE="$RELEASE_DIR/ia-interact-linux-x86_64.AppImage"
9+
APPIMAGE_ARCH="${APPIMAGE_ARCH:-x86_64}"
10+
11+
case "$APPIMAGE_ARCH" in
12+
x86_64)
13+
APPIMAGE_TOOL_ARCH="x86_64"
14+
;;
15+
aarch64|arm64)
16+
APPIMAGE_ARCH="aarch64"
17+
APPIMAGE_TOOL_ARCH="aarch64"
18+
;;
19+
*)
20+
printf 'Unsupported APPIMAGE_ARCH: %s\n' "$APPIMAGE_ARCH" >&2
21+
printf 'Supported values: x86_64, aarch64 (or arm64)\n' >&2
22+
exit 1
23+
;;
24+
esac
25+
26+
APPIMAGE_TOOL="$ROOT_DIR/appimagetool-${APPIMAGE_TOOL_ARCH}.AppImage"
27+
OUTPUT_APPIMAGE="$RELEASE_DIR/ia-interact-linux-${APPIMAGE_ARCH}.AppImage"
1128

1229
pyinstaller \
1330
--clean \
@@ -55,11 +72,11 @@ fi
5572
cp "$APPDIR/ia-interact.png" "$APPDIR/usr/share/icons/hicolor/256x256/apps/ia-interact.png"
5673

5774
if [[ ! -x "$APPIMAGE_TOOL" ]]; then
58-
curl -fsSL -o "$APPIMAGE_TOOL" "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
75+
curl -fsSL -o "$APPIMAGE_TOOL" "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-${APPIMAGE_TOOL_ARCH}.AppImage"
5976
chmod +x "$APPIMAGE_TOOL"
6077
fi
6178

6279
mkdir -p "$RELEASE_DIR"
63-
ARCH=x86_64 APPIMAGE_EXTRACT_AND_RUN=1 "$APPIMAGE_TOOL" "$APPDIR" "$OUTPUT_APPIMAGE"
80+
ARCH="$APPIMAGE_ARCH" APPIMAGE_EXTRACT_AND_RUN=1 "$APPIMAGE_TOOL" "$APPDIR" "$OUTPUT_APPIMAGE"
6481

6582
printf 'AppImage created at %s\n' "$OUTPUT_APPIMAGE"

0 commit comments

Comments
 (0)