Files
os/.gitea/workflows/packages.yml
2026-10-25 14:11:49 +01:00

71 lines
2.4 KiB
YAML

# Builds, signs and publishes the Fennec OS packages (shell + apps) to the
# Gitea generic package registry. A package is only built when its version
# isn't published yet: bump the version to release (docs/updates.md).
#
# Runner hygiene (shared host, little disk): runs in the runner image that is
# already on the host (no image pull), uses no `uses:` actions (no action
# cache), and deletes everything it made at the end.
name: packages
on:
push:
branches: [main]
paths:
- "crates/**"
- "apps/**"
- "Cargo.toml"
- "Cargo.lock"
- "tools/pkg/**"
- "tools/siri-remote/fastpair.py"
- ".gitea/workflows/packages.yml"
workflow_dispatch:
# Steam follows Valve's official steam-launcher package (tools/pkg/steam):
# look for a new one every Monday; nothing is built if it's published already.
schedule:
- cron: "17 4 * * 1"
jobs:
packages:
runs-on: build
container:
image: docker.gitea.com/runner-images:ubuntu-latest
env:
CARGO_HOME: /tmp/sf-build/cargo
RUSTUP_HOME: /tmp/sf-build/rustup
CARGO_TARGET_DIR: /tmp/sf-build/target
CARGO_INCREMENTAL: "0"
SF_OUT: /tmp/sf-build/out
steps:
- name: Checkout
run: |
mkdir -p /tmp/sf-build
host="${GITHUB_SERVER_URL#https://}"
git clone --depth 1 --branch "${GITHUB_REF_NAME}" \
"https://oauth2:${{ secrets.GITHUB_TOKEN }}@${host}/${GITHUB_REPOSITORY}.git" /tmp/sf-build/src
- name: Toolchain
run: |
export DEBIAN_FRONTEND=noninteractive
apt-get update -qq
apt-get install -y -qq --no-install-recommends build-essential pkg-config zstd gpgv dpkg \
libfontconfig1-dev libfreetype-dev libxkbcommon-dev libdbus-1-dev libudev-dev \
libinput-dev libgbm-dev libseat-dev libdrm-dev libegl-dev >/dev/null
rm -rf /var/lib/apt/lists/*
curl -sSf https://sh.rustup.rs | sh -s -- -y -q --profile minimal --no-modify-path
/tmp/sf-build/cargo/bin/rustc --version
- name: Build, sign, upload
env:
SF_SIGNING_KEY: ${{ secrets.SF_SIGNING_KEY }}
SF_PACKAGE_TOKEN: ${{ secrets.SF_PACKAGE_TOKEN }}
run: |
export PATH="/tmp/sf-build/cargo/bin:$PATH"
cd /tmp/sf-build/src
bash tools/pkg/packages.sh --upload
- name: Clean up
if: always()
run: |
rm -rf /tmp/sf-build
df -h / | tail -1