mirror of
https://github.com/liamcottle/reticulum-meshchat.git
synced 2026-04-27 16:10:32 +00:00
Changes to package.json: - Enable ASAR packaging (was disabled) - Replace extraFiles with extraResources for Python executables - Old: Resources/app/electron/build/exe - New: Resources/python (outside ASAR, accessible to spawn) - Mac: Add universal build support (x64 + arm64 in single .dmg) - Mac: Add x64ArchFiles rule for Python (cx_Freeze creates universal binaries) - Mac: Add explicit icon configuration - Mac: Update artifact name to include architecture - Remove buildResources directive (conflicted with extraResources) - Remove duplicate extraFiles from win/linux sections (centralized) - Add npm scripts: dist:mac-arm64 and dist:mac-universal Changes to electron/main.js: - Update Python exe path resolution for extraResources location - Check process.resourcesPath/python first (production build) - Fall back to local build/exe for development Changes to .github/workflows/build.yml: - Switch Mac runner from macos-13 (Intel) to macos-14 (Apple Silicon) - Update artifacts pattern from '*-mac.dmg' to '*-mac-*.dmg'
157 lines
3.8 KiB
YAML
157 lines
3.8 KiB
YAML
name: Build and Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
|
|
jobs:
|
|
build_windows:
|
|
runs-on: windows-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Clone Repo
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Install NodeJS
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 18
|
|
|
|
- name: Install Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Install Python Deps
|
|
run: pip install -r requirements.txt
|
|
|
|
- name: Install NodeJS Deps
|
|
run: npm install
|
|
|
|
- name: Build Electron App
|
|
run: npm run dist
|
|
|
|
- name: Create Release
|
|
id: create_release
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
draft: true
|
|
allowUpdates: true
|
|
replacesArtifacts: true
|
|
omitDraftDuringUpdate: true
|
|
omitNameDuringUpdate: true
|
|
artifacts: "dist/*-win-installer.exe,dist/*-win-portable.exe"
|
|
|
|
build_mac:
|
|
runs-on: macos-14
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Clone Repo
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Install NodeJS
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 18
|
|
|
|
- name: Install Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Install Python Deps
|
|
run: pip install -r requirements.txt
|
|
|
|
- name: Install NodeJS Deps
|
|
run: npm install
|
|
|
|
- name: Build Electron App (Universal)
|
|
run: npm run dist
|
|
|
|
- name: Create Release
|
|
id: create_release
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
draft: true
|
|
allowUpdates: true
|
|
replacesArtifacts: true
|
|
omitDraftDuringUpdate: true
|
|
omitNameDuringUpdate: true
|
|
artifacts: "dist/*-mac-*.dmg"
|
|
|
|
build_linux:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Clone Repo
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Install NodeJS
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 18
|
|
|
|
- name: Install Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Install Python Deps
|
|
run: pip install -r requirements.txt
|
|
|
|
- name: Install NodeJS Deps
|
|
run: npm install
|
|
|
|
- name: Build Electron App
|
|
run: npm run dist
|
|
|
|
- name: Create Release
|
|
id: create_release
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
draft: true
|
|
allowUpdates: true
|
|
replacesArtifacts: true
|
|
omitDraftDuringUpdate: true
|
|
omitNameDuringUpdate: true
|
|
artifacts: "dist/*-linux.AppImage"
|
|
|
|
build_docker:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
packages: write
|
|
contents: read
|
|
steps:
|
|
- name: Clone Repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to the GitHub Container registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build and push Docker images
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
tags: |
|
|
ghcr.io/liamcottle/reticulum-meshchat:latest
|
|
ghcr.io/liamcottle/reticulum-meshchat:${{ github.ref_name }}
|
|
labels: |
|
|
org.opencontainers.image.title=Reticulum MeshChat
|
|
org.opencontainers.image.description=Docker image for Reticulum MeshChat
|
|
org.opencontainers.image.url=https://github.com/liamcottle/reticulum-meshchat/pkgs/container/reticulum-meshchat/
|