mirror of
https://github.com/pumpbin/pumpbin
synced 2026-03-15 07:14:30 -07:00
80 lines
3.3 KiB
YAML
80 lines
3.3 KiB
YAML
name: build-release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v[0-9]+.[0-9]+.[0-9]+"
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build-windows:
|
|
name: build-windows
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain:
|
|
stable-x86_64-pc-windows-msvc
|
|
targets: x86_64-pc-windows-msvc, aarch64-pc-windows-msvc
|
|
- run: cargo build --release --target=x86_64-pc-windows-msvc
|
|
- run: cargo build --release --target=aarch64-pc-windows-msvc
|
|
- run: mv target/x86_64-pc-windows-msvc/release/pumpbin.exe PumpBin-x86_64-pc-windows-msvc.exe
|
|
- run: mv target/x86_64-pc-windows-msvc/release/maker.exe PumpBin-Maker-x86_64-pc-windows-msvc.exe
|
|
- run: mv target/aarch64-pc-windows-msvc/release/pumpbin.exe PumpBin-aarch64-pc-windows-msvc.exe
|
|
- run: mv target/aarch64-pc-windows-msvc/release/maker.exe PumpBin-Maker-aarch64-pc-windows-msvc.exe
|
|
- uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: |
|
|
PumpBin-x86_64-pc-windows-msvc.exe
|
|
PumpBin-Maker-x86_64-pc-windows-msvc.exe
|
|
PumpBin-aarch64-pc-windows-msvc.exe
|
|
PumpBin-Maker-aarch64-pc-windows-msvc.exe
|
|
|
|
build-macos:
|
|
name: build-macos
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: x86_64-apple-darwin, aarch64-apple-darwin
|
|
- run: bash scripts/build-macos.sh
|
|
- run: mv target/release/macos-pumpbin/PumpBin.dmg PumpBin.dmg
|
|
- run: mv target/release/macos-maker/PumpBin-Maker.dmg PumpBin-Maker.dmg
|
|
- uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: |
|
|
PumpBin.dmg
|
|
PumpBin-Maker.dmg
|
|
|
|
build-linux:
|
|
name: build-linux
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu
|
|
- run: sudo dpkg --add-architecture arm64
|
|
- run: sudo rm -f /etc/apt/sources.list
|
|
- run: sudo curl -o /etc/apt/sources.list https://gist.githubusercontent.com/b1nhack/a647647822957622b5e92a45f9d67f8e/raw/78c28ae9375c0c7c2e9182d1f1944caf3e7ceb7a/sources.list
|
|
- run: sudo apt-get update
|
|
- run: sudo apt-get install -y libcups2:arm64
|
|
- run: sudo apt-get install -y gcc-aarch64-linux-gnu libgtk-3-dev libgtk-3-dev:arm64
|
|
- run: cargo build --release --target=x86_64-unknown-linux-gnu
|
|
- run: PKG_CONFIG_SYSROOT_DIR=/usr/aarch64-linux-gnu/ cargo build --release --target=aarch64-unknown-linux-gnu
|
|
- run: mv target/x86_64-unknown-linux-gnu/release/pumpbin PumpBin-x86_64-unknown-linux-gnu
|
|
- run: mv target/x86_64-unknown-linux-gnu/release/maker PumpBin-Maker-x86_64-unknown-linux-gnu
|
|
- run: mv target/aarch64-unknown-linux-gnu/release/pumpbin PumpBin-aarch64-unknown-linux-gnu
|
|
- run: mv target/aarch64-unknown-linux-gnu/release/maker PumpBin-Maker-aarch64-unknown-linux-gnu
|
|
- uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: |
|
|
PumpBin-x86_64-unknown-linux-gnu
|
|
PumpBin-Maker-x86_64-unknown-linux-gnu
|
|
PumpBin-aarch64-unknown-linux-gnu
|
|
PumpBin-Maker-aarch64-unknown-linux-gnu
|