mirror of
https://codeberg.org/Toasterson/ips.git
synced 2026-04-10 21:30:41 +00:00
81 lines
2.3 KiB
YAML
81 lines
2.3 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
build-illumos:
|
|
name: Build on Illumos (OmniOS)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Build in OmniOS VM
|
|
uses: vmactions/omnios-vm@v1
|
|
with:
|
|
prepare: |
|
|
pkg set-publisher -g https://pkg.omnios.org/r151056/extra/ extra.omnios
|
|
pkg install -v ooce/developer/rust ooce/omnios-build-tools ooce/util/jq library/zlib compress/lz4
|
|
run: |
|
|
# Set environment variables for native libraries
|
|
export CFLAGS="-m64"
|
|
export LDFLAGS="-m64"
|
|
cargo build --release
|
|
mkdir -p artifacts
|
|
cp target/release/pkg6 artifacts/
|
|
cp target/release/pkg6repo artifacts/
|
|
cp target/release/pkg6depotd artifacts/
|
|
tar czf ips-illumos-x86_64.tar.gz -C artifacts .
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ips-illumos-x86_64
|
|
path: ips-illumos-x86_64.tar.gz
|
|
|
|
build-linux:
|
|
name: Build on Linux
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Setup Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
- name: Build
|
|
run: |
|
|
cargo build --release
|
|
mkdir -p artifacts
|
|
cp target/release/pkg6 artifacts/
|
|
cp target/release/pkg6repo artifacts/
|
|
cp target/release/pkg6depotd artifacts/
|
|
tar czf ips-linux-x86_64.tar.gz -C artifacts .
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ips-linux-x86_64
|
|
path: ips-linux-x86_64.tar.gz
|
|
|
|
create-release:
|
|
name: Create GitHub Release
|
|
needs: [build-illumos, build-linux]
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Download Illumos Artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: ips-illumos-x86_64
|
|
- name: Download Linux Artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: ips-linux-x86_64
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: |
|
|
ips-illumos-x86_64.tar.gz
|
|
ips-linux-x86_64.tar.gz
|
|
generate_release_notes: true
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|