Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19bed7d812 | ||
|
|
32da1e8ee1 | ||
|
|
30d4c9dd47 | ||
|
|
6685db8063 | ||
|
|
fd8f7a13d5 | ||
|
|
eb845563a7 | ||
|
|
c0b37f456e | ||
|
|
02d4e015c7 | ||
|
|
3eb2b8319d | ||
|
|
8d2ac1c4e4 | ||
|
|
797a9f7535 | ||
|
|
8e4ae990f9 | ||
|
|
fd4889da1e | ||
|
|
9c1fff82d9 | ||
|
|
83edd9c2da | ||
|
|
f30f06ea13 | ||
|
|
ffcca538bf | ||
|
|
4577d9f6b9 | ||
|
|
334ceae3ea | ||
|
|
b156f203ba | ||
|
|
411a2ae164 | ||
|
|
2d910949ad | ||
|
|
6ecc2b4946 | ||
|
|
cec04a1cda |
@@ -9,44 +9,70 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-linux:
|
build-linux:
|
||||||
|
name: Build Linux Binary
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.12'
|
python-version: '3.12'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
- name: Build
|
||||||
- name: Build with PyInstaller
|
run: pyinstaller --onefile --name tamigo-cli tamigo.py
|
||||||
run: |
|
- name: Upload Linux Artifact
|
||||||
pyinstaller --onefile --name tamigo-cli tamigo.py
|
|
||||||
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: tamigo-cli-linux
|
name: tamigo-cli-linux-binary
|
||||||
path: dist/tamigo-cli
|
path: dist/tamigo-cli
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
|
name: Build Windows Binary
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build Windows executable via Docker
|
- name: Build Windows executable (Robust CP Method)
|
||||||
run: |
|
run: |
|
||||||
docker run --rm \
|
CONTAINER_NAME="win-builder-${{ github.run_id }}"
|
||||||
-v "${{ github.workspace }}:/src" \
|
|
||||||
cdrx/pyinstaller-windows \
|
|
||||||
sh -c "pip install -r requirements.txt && pyinstaller --onefile --name tamigo-cli tamigo.py"
|
|
||||||
|
|
||||||
- name: Upload artifact
|
# 1. Create and start container in background
|
||||||
|
docker run -d --name $CONTAINER_NAME --entrypoint tail cdrx/pyinstaller-windows -f /dev/null
|
||||||
|
|
||||||
|
# 2. Copy source into container
|
||||||
|
docker exec $CONTAINER_NAME mkdir -p /src
|
||||||
|
docker cp . $CONTAINER_NAME:/src
|
||||||
|
|
||||||
|
# 3. Run build with explicit environment variables to fix the /tmp bug
|
||||||
|
# We also use explicit paths for every PyInstaller directory
|
||||||
|
docker exec -w /src $CONTAINER_NAME sh -c "
|
||||||
|
export TMP=C:\\\\temp && \
|
||||||
|
export TEMP=C:\\\\temp && \
|
||||||
|
mkdir -p /src/build /src/dist_win && \
|
||||||
|
pip install -r requirements.txt && \
|
||||||
|
pyinstaller --onefile --name tamigo-cli \
|
||||||
|
--workpath /src/build \
|
||||||
|
--distpath /src/dist_win \
|
||||||
|
--specpath /src/build \
|
||||||
|
tamigo.py"
|
||||||
|
|
||||||
|
# 4. Extract results
|
||||||
|
mkdir -p win_dist
|
||||||
|
docker cp $CONTAINER_NAME:/src/dist_win/tamigo-cli.exe ./win_dist/tamigo-cli.exe
|
||||||
|
|
||||||
|
# 5. Cleanup
|
||||||
|
docker rm -f $CONTAINER_NAME
|
||||||
|
|
||||||
|
- name: Debug - List Files
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
ls -R win_dist/ || echo "win_dist not found"
|
||||||
|
|
||||||
|
- name: Upload Windows Artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: tamigo-cli-windows
|
name: tamigo-cli-windows-binary
|
||||||
path: dist/tamigo-cli.exe
|
path: win_dist/tamigo-cli.exe
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ on:
|
|||||||
types: [published]
|
types: [published]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-linux:
|
release-linux:
|
||||||
|
name: Build & Release Linux
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -19,24 +20,40 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
pyinstaller --onefile --name tamigo-cli tamigo.py
|
pyinstaller --onefile --name tamigo-cli tamigo.py
|
||||||
- name: Upload artifact
|
- name: Rename for release
|
||||||
uses: actions/upload-artifact@v3
|
run: mv dist/tamigo-cli dist/tamigo-cli-linux
|
||||||
|
- name: Upload to Release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
name: tamigo-cli-linux
|
files: dist/tamigo-cli-linux
|
||||||
path: dist/tamigo-cli
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
build-windows:
|
release-windows:
|
||||||
|
name: Build & Release Windows
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Build Windows executable via Docker
|
- name: Build Windows executable via Docker (Modern & Robust)
|
||||||
run: |
|
run: |
|
||||||
docker run --rm \
|
CONTAINER_NAME="rel-builder-${{ github.run_id }}"
|
||||||
-v "${{ github.workspace }}:/src" \
|
docker rm -f $CONTAINER_NAME || true
|
||||||
cdrx/pyinstaller-windows \
|
|
||||||
sh -c "pip install -r requirements.txt && pyinstaller --onefile --name tamigo-cli tamigo.py"
|
# Using burningtyger/pyinstaller-windows for better path handling
|
||||||
- name: Upload artifact
|
docker create --name $CONTAINER_NAME burningtyger/pyinstaller-windows "pip install -r requirements.txt && pyinstaller --onefile --name tamigo-cli tamigo.py"
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
|
docker cp . $CONTAINER_NAME:/src
|
||||||
|
docker start -a $CONTAINER_NAME
|
||||||
|
docker cp $CONTAINER_NAME:/src/dist .
|
||||||
|
docker rm $CONTAINER_NAME
|
||||||
|
|
||||||
|
- name: Debug - List output files
|
||||||
|
run: ls -R dist/
|
||||||
|
- name: Rename for release
|
||||||
|
run: mv dist/*.exe dist/tamigo-cli-windows.exe
|
||||||
|
- name: Upload to Release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
name: tamigo-cli-windows
|
files: dist/tamigo-cli-windows.exe
|
||||||
path: dist/tamigo-cli.exe
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
Reference in New Issue
Block a user