Testing workflow
All checks were successful
Multi-Platform Release Build / build (false, linux/arm64, native) (push) Successful in 6m7s
Multi-Platform Release Build / build (true, build-essential gcc-x86-64-linux-gnu libc6-dev-amd64-cross pkg-config binutils-x86-64-linux-gnu, map[CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER:x86_64-linux-gnu-gcc], linux/amd64, x86_64-unknown-linux-gnu) (push) Successful in 9m15s
Multi-Platform Release Build / build (true, gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 cmake nasm, map[CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER:x86_64-w64-mingw32-gcc CC_x86_64_pc_windows_gnu:x86_64-w64-mingw32-gcc], linux/amd64, x86_64-pc-windows-gnu) (push) Successful in 10m35s
Multi-Platform Release Build / create-release (push) Successful in 41s
All checks were successful
Multi-Platform Release Build / build (false, linux/arm64, native) (push) Successful in 6m7s
Multi-Platform Release Build / build (true, build-essential gcc-x86-64-linux-gnu libc6-dev-amd64-cross pkg-config binutils-x86-64-linux-gnu, map[CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER:x86_64-linux-gnu-gcc], linux/amd64, x86_64-unknown-linux-gnu) (push) Successful in 9m15s
Multi-Platform Release Build / build (true, gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 cmake nasm, map[CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER:x86_64-w64-mingw32-gcc CC_x86_64_pc_windows_gnu:x86_64-w64-mingw32-gcc], linux/amd64, x86_64-pc-windows-gnu) (push) Successful in 10m35s
Multi-Platform Release Build / create-release (push) Successful in 41s
This commit is contained in:
parent
78d0e553af
commit
a8467a3cf1
1 changed files with 3 additions and 2 deletions
|
|
@ -1,185 +0,0 @@
|
|||
name: Multi-Platform Release Build
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*.*.*"
|
||||
jobs:
|
||||
build:
|
||||
runs-on: docker
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- target: native
|
||||
cross: false
|
||||
platform: linux/arm64
|
||||
|
||||
- target: x86_64-unknown-linux-gnu
|
||||
cross: true
|
||||
platform: linux/amd64
|
||||
deps: "build-essential gcc-x86-64-linux-gnu libc6-dev-amd64-cross pkg-config binutils-x86-64-linux-gnu"
|
||||
env:
|
||||
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER: x86_64-linux-gnu-gcc
|
||||
|
||||
- target: x86_64-pc-windows-gnu
|
||||
cross: true
|
||||
platform: linux/amd64
|
||||
deps: "gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 cmake nasm"
|
||||
env:
|
||||
CC_x86_64_pc_windows_gnu: x86_64-w64-mingw32-gcc
|
||||
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER: x86_64-w64-mingw32-gcc
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: https://code.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Setup Rust
|
||||
uses: https://github.com/dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
- name: Cache Rust dependencies
|
||||
uses: https://code.forgejo.org/actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
target/
|
||||
key: ${{ runner.os }}-cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cargo-${{ matrix.target }}-
|
||||
${{ runner.os }}-cargo-
|
||||
|
||||
- name: Native Build Release
|
||||
if: matrix.target == 'native'
|
||||
run: |
|
||||
NATIVE_TARGET=$(rustc -vV | grep 'host:' | cut -d' ' -f2)
|
||||
echo "Building for native target: $NATIVE_TARGET"
|
||||
cargo build --release
|
||||
TARGET_BINARY="target/release/uptime-kuma-dashboard"
|
||||
OUTPUT_NAME="uptime-kuma-dashboard-$NATIVE_TARGET"
|
||||
mkdir -p release-artifacts
|
||||
cp "$TARGET_BINARY" "release-artifacts/$OUTPUT_NAME"
|
||||
strip "release-artifacts/$OUTPUT_NAME" 2>/dev/null || true
|
||||
chmod +x "release-artifacts/$OUTPUT_NAME"
|
||||
ls -lh "release-artifacts/$OUTPUT_NAME"
|
||||
|
||||
- name: Get Rust version
|
||||
id: rust-version
|
||||
run: echo "version=$(rustc --version | cut -d' ' -f2)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cross-Build Linux x86_64 Release
|
||||
if: matrix.target == 'x86_64-unknown-linux-gnu'
|
||||
uses: docker://rust:slim
|
||||
with:
|
||||
args: >
|
||||
sh -c "
|
||||
rustup target add ${{ matrix.target }} &&
|
||||
apt-get update && apt-get install -y ${{ matrix.deps }} &&
|
||||
mkdir -p ~/.cargo &&
|
||||
echo '[target.${{ matrix.target }}]\nlinker = \"x86_64-linux-gnu-gcc\"' > ~/.cargo/config.toml &&
|
||||
cargo build --release --target ${{ matrix.target }} &&
|
||||
mkdir -p release-artifacts &&
|
||||
cp target/${{ matrix.target }}/release/uptime-kuma-dashboard release-artifacts/uptime-kuma-dashboard-${{ matrix.target }} &&
|
||||
x86_64-linux-gnu-strip release-artifacts/uptime-kuma-dashboard-${{ matrix.target }} &&
|
||||
chmod +x release-artifacts/uptime-kuma-dashboard-${{ matrix.target }}"
|
||||
env: ${{ matrix.env }}
|
||||
options: --platform ${{ matrix.platform }}
|
||||
|
||||
- name: Cross-Build Windows x86_64 Release
|
||||
if: matrix.target == 'x86_64-pc-windows-gnu'
|
||||
uses: docker://rust:slim
|
||||
with:
|
||||
args: >
|
||||
sh -c "
|
||||
rustup target add ${{ matrix.target }} &&
|
||||
apt-get update && apt-get install -y ${{ matrix.deps }} &&
|
||||
cargo build --release --target ${{ matrix.target }} &&
|
||||
mkdir -p release-artifacts &&
|
||||
cp target/${{ matrix.target }}/release/uptime-kuma-dashboard.exe release-artifacts/uptime-kuma-dashboard-${{ matrix.target }}.exe &&
|
||||
ls -lh release-artifacts/"
|
||||
env: ${{ matrix.env }}
|
||||
options: --platform ${{ matrix.platform }}
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: https://data.forgejo.org/forgejo/upload-artifact@v4
|
||||
with:
|
||||
name: binary-${{ matrix.target }}
|
||||
path: release-artifacts/
|
||||
retention-days: 1
|
||||
|
||||
create-release:
|
||||
runs-on: docker
|
||||
needs: build
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: https://code.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Download all artifacts
|
||||
uses: https://data.forgejo.org/forgejo/download-artifact@v4
|
||||
with:
|
||||
path: all-artifacts/
|
||||
|
||||
- name: Prepare release artifacts
|
||||
run: |
|
||||
mkdir -p release-artifacts
|
||||
find all-artifacts -type f -name "uptime-kuma-dashboard-*" -exec cp {} release-artifacts/ \;
|
||||
ls -lh release-artifacts/
|
||||
|
||||
- name: Generate checksums
|
||||
run: |
|
||||
cd release-artifacts
|
||||
sha256sum uptime-kuma-dashboard-* > SHA256SUMS.txt
|
||||
cat SHA256SUMS.txt
|
||||
|
||||
- name: Create Release
|
||||
uses: https://code.forgejo.org/actions/forgejo-release@v2
|
||||
with:
|
||||
direction: upload
|
||||
url: https://git.marcodearaujo.com
|
||||
repo: marcodearaujo/uptime-kuma-dashboard
|
||||
token: ${{ secrets.FORGEJO_TOKEN }}
|
||||
release-dir: release-artifacts
|
||||
title: "Release ${{ forgejo.ref_name }}"
|
||||
tag: ${{ forgejo.ref_name }}
|
||||
release-notes: |
|
||||
## 🚀 Multi-Platform Release
|
||||
Compiled on Forgejo Runner **${{ runner.arch }}**
|
||||
|
||||
### 📦 Available Binaries
|
||||
This release includes binaries for the following platforms:
|
||||
- **Linux x86_64** (Intel/AMD 64-bit)
|
||||
- **Linux ARM64** (aarch64) - Raspberry Pi 4, ARM servers
|
||||
- **Windows x86_64** (64-bit)
|
||||
|
||||
### 🚀 How to use
|
||||
#### Linux/ARM:
|
||||
```bash
|
||||
# Download the appropriate binary
|
||||
wget https://your-forgejo.com/releases/download/${{ forgejo.ref_name }}/uptime-kuma-dashboard-<your-target>
|
||||
# Make executable
|
||||
chmod +x uptime-kuma-dashboard-*
|
||||
# Run
|
||||
./uptime-kuma-dashboard-* --base-url https://your-kuma --slug your-slug
|
||||
```
|
||||
|
||||
#### Windows:
|
||||
```powershell
|
||||
# Download uptime-kuma-dashboard-x86_64-pc-windows-gnu.exe
|
||||
# Run in PowerShell or CMD
|
||||
.\uptime-kuma-dashboard-x86_64-pc-windows-gnu.exe --base-url https://your-kuma --slug your-slug
|
||||
```
|
||||
|
||||
### ✅ Verify Checksums
|
||||
```bash
|
||||
sha256sum -c SHA256SUMS.txt
|
||||
```
|
||||
|
||||
### 🏗️ Build Information
|
||||
- Rust Version: ${{ steps.rust-version.outputs.version }}
|
||||
- Build Date: $(date +'%Y-%m-%d')
|
||||
- Build Type: Release (optimized with LTO)
|
||||
Loading…
Add table
Add a link
Reference in a new issue