Files
presence/.gitea/workflows/release.yml
T
2026-10-08 21:38:40 +02:00

62 lines
2.2 KiB
YAML

name: Release
# A v* tag builds the Arch package natively per arch and uploads it to the
# [uhhm] registry (namespace bl, as pacman.conf points there). REGISTRY_TOKEN
# is the uhhm org's action secret (a bl write:package token), which every
# repo in the org inherits; nothing to add per repo.
on:
push:
tags:
- 'v*'
env:
PACKAGER: uhhm CI <bendik@lynghaug.me>
# Arch Linux ARM's makepkg.conf (klokka) differs from Arch's: pin where
# packages land and their format, so publish-registry finds them.
PKGDEST: .
PKGEXT: .pkg.tar.zst
jobs:
# runner-1 (Docker on ergo): Arch container on the ubuntu-latest label.
x86_64:
runs-on: ubuntu-latest
container: archlinux:latest
steps:
- name: Prepare container
run: pacman -Syu --noconfirm --needed base-devel git rust dbus
- name: Checkout
uses: builtin:checkout
- name: Check tag, PKGBUILD and Cargo.toml agree
run: scripts/check-version "${GITHUB_REF_NAME#v}"
- name: Build
run: |
useradd -m builder
chown -R builder: .
sudo -u builder --preserve-env=PACKAGER,PKGDEST,PKGEXT makepkg -f --noconfirm
- name: Publish to the Arch package registry
run: scripts/publish-registry .
env:
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
REGISTRY_URL: ${{ gitea.server_url }}/api/packages/bl/arch/uhhm
# klokka: bare Arch Linux ARM host. Nothing is installed with pacman there;
# cargo comes from the rustup toolchain the action keeps in the runner's
# home, hence -d (makepkg would otherwise look for a cargo *package*).
# libdbus is on the host already (bluez pulls it in).
aarch64:
runs-on: aarch64
steps:
- name: Checkout
uses: builtin:checkout
- name: Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Check tag, PKGBUILD and Cargo.toml agree
run: scripts/check-version "${GITHUB_REF_NAME#v}"
- name: Build
run: makepkg -f -d --noconfirm
- name: Publish to the Arch package registry
run: scripts/publish-registry .
env:
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
REGISTRY_URL: ${{ gitea.server_url }}/api/packages/bl/arch/uhhm