mirror of
https://github.com/mileswolfallen2/gelectron.git
synced 2026-12-04 07:57:44 +00:00
Add native installers (DMG/EXE/AppImage) to releases
This commit is contained in:
1 parent
40f15bc45a
commit
247daa6460
9 files changed
+1015
-4
No files matched your search
@@ -64,9 +64,89 @@ jobs:
|
||||
name: bindings-${{ matrix.target }}
|
||||
path: gelectron_core.*.node
|
||||
|
||||
runtime:
|
||||
name: Runtime ${{ matrix.target }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: macos-latest
|
||||
target: aarch64-apple-darwin
|
||||
platform: darwin
|
||||
arch: arm64
|
||||
- os: macos-latest
|
||||
target: x86_64-apple-darwin
|
||||
platform: darwin
|
||||
arch: x64
|
||||
- os: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
platform: win32
|
||||
arch: x64
|
||||
- os: windows-latest
|
||||
target: aarch64-pc-windows-msvc
|
||||
platform: win32
|
||||
arch: arm64
|
||||
- os: ubuntu-latest
|
||||
target: x86_64-unknown-linux-gnu
|
||||
platform: linux
|
||||
arch: x64
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: ${{ matrix.target }}
|
||||
|
||||
- name: Install Linux system dependencies
|
||||
if: matrix.platform == 'linux'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev libsoup-3.0-dev
|
||||
|
||||
- name: Build gelectron binary
|
||||
run: cargo build --release -p gelectron --target ${{ matrix.target }}
|
||||
|
||||
- name: Package release archive
|
||||
run: |
|
||||
bash scripts/make-release.sh \
|
||||
-v "${{ github.ref_name }}" \
|
||||
-p ${{ matrix.platform }} \
|
||||
-a ${{ matrix.arch }} \
|
||||
-b "target/${{ matrix.target }}/release/gelectron" \
|
||||
--no-build
|
||||
|
||||
- name: Build macOS installer (DMG)
|
||||
if: matrix.platform == 'darwin'
|
||||
run: bash scripts/pkg/make-dmg.sh -v "${{ github.ref_name }}" -a ${{ matrix.arch }} -b "target/${{ matrix.target }}/release/gelectron" -o dist
|
||||
|
||||
- name: Build Windows installer (EXE)
|
||||
if: matrix.platform == 'win32' && matrix.arch == 'x64'
|
||||
shell: pwsh
|
||||
run: |
|
||||
choco install nsis -y --no-progress
|
||||
powershell -File scripts/pkg/make-exe.ps1 -Bin "target/${{ matrix.target }}/release/gelectron.exe" -Compat src/electron -Version "${{ github.ref_name }}" -Arch x64 -Out dist
|
||||
|
||||
- name: Build Linux installer (AppImage)
|
||||
if: matrix.platform == 'linux'
|
||||
run: bash scripts/pkg/make-appimage.sh -v "${{ github.ref_name }}" -b "target/${{ matrix.target }}/release/gelectron" -o dist
|
||||
|
||||
- name: Upload installer artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: installers-${{ matrix.target }}
|
||||
path: |
|
||||
dist/gelectron-*
|
||||
dist/Gelectron-*
|
||||
if-no-files-found: error
|
||||
|
||||
release:
|
||||
name: Attach binaries to GitHub Release
|
||||
needs: build
|
||||
needs: [build, runtime]
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -79,10 +159,17 @@ jobs:
|
||||
pattern: bindings-*
|
||||
merge-multiple: true
|
||||
|
||||
- name: List binaries
|
||||
- name: Download all installers
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: artifacts
|
||||
pattern: installers-*
|
||||
merge-multiple: true
|
||||
|
||||
- name: List artifacts
|
||||
run: ls -la artifacts/
|
||||
|
||||
- name: Upload binaries to GitHub Release
|
||||
- name: Upload assets to GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: artifacts/*.node
|
||||
files: artifacts/**
|
||||
Reference in new issue
Block a user