Files
gtk-ahfail/.gitea/workflows/release.yml
T
Asger Geel Weirsøe 2cf3b06aeb Install openssh in the CI containers
The runner rewrites Gitea URLs to SSH on port 2222, and without openssh
git falls back to the 'simple' SSH variant, which cannot set a port, so
checkout failed.

Claude-Session: https://claude.ai/code/session_012LCTmU2ewo8tnM1dByYAoG
2026-09-30 19:31:53 +02:00

70 lines
2.4 KiB
YAML

name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
# Built on Arch: the locker needs gtk-session-lock (not packaged by Ubuntu).
container:
image: archlinux:base-devel
steps:
- name: Install system dependencies
run: pacman -Syu --noconfirm --needed base-devel git openssh nodejs rust meson ninja gtk3 gtk-session-lock gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad-libs pam curl
- uses: actions/checkout@v4
- name: Compute source tarball SHA256
run: |
SHA256=$(curl -fsSL \
"https://gitea.weircon.dk/agw/gtk-ahfail/archive/${{ github.ref_name }}.tar.gz" \
| sha256sum | cut -d' ' -f1)
echo "SOURCE_SHA256=${SHA256}" >> $GITHUB_ENV
- name: Build release
run: |
meson setup builddir --buildtype=release
meson compile -C builddir
- name: Bundle artifacts
run: |
mkdir -p dist
cp builddir/ahfail-module.so dist/
cp builddir/libahfail_pam.so dist/
cp builddir/ahfail-display dist/
cp builddir/ahfail dist/
cp data/pam.d/ahfail dist/ahfail.pam
tar czf ahfail-linux-x86_64.tar.gz -C dist .
- name: Upload release asset
# Requires a GITEA_TOKEN secret with write:repository scope.
# Create it in repo Settings → Secrets.
uses: https://gitea.com/actions/gitea-release-action@v1
with:
token: ${{ secrets.GITEA_TOKEN }}
server_url: ${{ github.server_url }}
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
files: ahfail-linux-x86_64.tar.gz
- name: Update Homebrew tap
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
TAG: ${{ github.ref_name }}
run: |
set -euo pipefail
git clone \
"https://oauth2:${GITEA_TOKEN}@gitea.weircon.dk/agw/homebrew-ahfail.git" \
tap
cd tap
sed -i "s|url \".*\"|url \"https://gitea.weircon.dk/agw/gtk-ahfail/archive/${TAG}.tar.gz\"|" Formula/ahfail.rb
sed -i "s|sha256 \".*\"|sha256 \"${SOURCE_SHA256}\"|" Formula/ahfail.rb
git config user.email "actions@weircon.dk"
git config user.name "Gitea Actions"
git add Formula/ahfail.rb
git diff --cached --quiet || git commit -m "chore: update ahfail to ${TAG}"
git push