aur.yml RawHistoryFolder
1name: AUR Publish
2
3# This workflow only publishes the dumber-browser-bin package to AUR.
4# The dumber-browser-git package does not need automated updates since it
5# always builds from the latest source using `git+https://` in its PKGBUILD.
6
7on:
8 workflow_run:
9 workflows: ["Flatpak"]
10 types:
11 - completed
12
13jobs:
14 publish-aur:
15 name: Publish to AUR
16 runs-on: ubuntu-latest
17 if: ${{ github.event.workflow_run.conclusion == 'success' }}
18
19 steps:
20 - uses: actions/checkout@v4
21 with:
22 fetch-depth: 0
23
24 - name: Get release info
25 id: release
26 run: |
27 TAG=$(git describe --tags --abbrev=0)
28 VERSION=${TAG#v}
29 echo "tag=${TAG}" >> $GITHUB_OUTPUT
30 echo "version=${VERSION}" >> $GITHUB_OUTPUT
31 echo "Publishing AUR package for $TAG (version $VERSION)"
32
33 - name: Wait 1 hour before publishing
34 run: |
35 echo "Waiting 1 hour before publishing to AUR..."
36 echo "This gives time to cancel if there are issues with the release."
37 echo "Started at: $(date -u)"
38 sleep 3600
39 echo "Wait complete at: $(date -u)"
40
41 - name: Verify release still exists
42 run: |
43 TAG="${{ steps.release.outputs.tag }}"
44 if ! gh release view "$TAG" &>/dev/null; then
45 echo "::error::Release $TAG no longer exists. Aborting AUR publish."
46 exit 1
47 fi
48 echo "Release $TAG verified, proceeding with AUR publish."
49 env:
50 GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51
52 - name: Download checksums
53 id: checksum
54 run: |
55 TAG="${{ steps.release.outputs.tag }}"
56 curl -sL "https://github.com/bnema/dumber/releases/download/${TAG}/checksums.txt" -o checksums.txt
57 cat checksums.txt
58 SHA256=$(grep 'dumber_linux_x86_64.tar.gz' checksums.txt | cut -d' ' -f1)
59 if [ -z "$SHA256" ]; then
60 echo "::error::Failed to extract SHA256 from checksums.txt"
61 exit 1
62 fi
63 echo "sha256=${SHA256}" >> $GITHUB_OUTPUT
64 echo "SHA256: ${SHA256}"
65
66 - name: Generate PKGBUILD for dumber-browser-bin
67 run: |
68 VERSION="${{ steps.release.outputs.version }}"
69 SHA256="${{ steps.checksum.outputs.sha256 }}"
70
71 mkdir -p pkgbuild/dumber-browser-bin
72
73 # Write PKGBUILD using printf to avoid heredoc issues
74 printf '%s\n' \
75 '# Maintainer: bnema <b at bnema dot dev>' \
76 'pkgname=dumber-browser-bin' \
77 "pkgver=${VERSION}" \
78 'pkgrel=1' \
79 'pkgdesc="A minimal keyboard-driven browser for tiling WMs"' \
80 "arch=('x86_64')" \
81 'url="https://github.com/bnema/dumber"' \
82 "license=('MIT')" \
83 "depends=('gtk4' 'webkitgtk-6.0')" \
84 'optdepends=(' \
85 " 'gst-plugins-base: Base media codecs'" \
86 " 'gst-plugins-good: Additional media codecs'" \
87 " 'gst-plugins-bad: Extended media codecs'" \
88 " 'gst-plugins-ugly: Patented media codecs'" \
89 " 'gst-libav: FFmpeg-based codecs'" \
90 " 'gst-plugin-pipewire: PipeWire audio support'" \
91 " 'gst-plugin-va: Hardware video decoding (VA-API stateless decoders)'" \
92 " 'pipewire: Audio/video routing'" \
93 " 'pipewire-pulse: PulseAudio replacement'" \
94 " 'mesa: VA-API driver for AMD GPUs'" \
95 " 'libva-nvidia-driver: VA-API driver for NVIDIA GPUs'" \
96 " 'libva-intel-driver: VA-API driver for older Intel GPUs'" \
97 " 'intel-media-driver: VA-API driver for newer Intel GPUs (Broadwell+)'" \
98 ')' \
99 "provides=('dumber-browser' 'dumber')" \
100 "conflicts=('dumber-browser' 'dumber-browser-git')" \
101 'source=("${pkgname}-${pkgver}.tar.gz::https://github.com/bnema/dumber/releases/download/v${pkgver}/dumber_linux_x86_64.tar.gz"' \
102 ' "dev.bnema.Dumber.desktop::https://raw.githubusercontent.com/bnema/dumber/v${pkgver}/dev.bnema.Dumber.desktop"' \
103 ' "logo-512.png::https://raw.githubusercontent.com/bnema/dumber/v${pkgver}/assets/logo-512.png"' \
104 ' "LICENSE::https://raw.githubusercontent.com/bnema/dumber/v${pkgver}/LICENSE")' \
105 "sha256sums=('${SHA256}'" \
106 " 'SKIP'" \
107 " 'SKIP'" \
108 " 'SKIP')" \
109 '' \
110 'package() {' \
111 ' cd "${srcdir}"' \
112 ' install -Dm755 dumber "${pkgdir}/usr/bin/dumber"' \
113 ' install -Dm644 "${srcdir}/dev.bnema.Dumber.desktop" "${pkgdir}/usr/share/applications/dev.bnema.Dumber.desktop"' \
114 ' install -Dm644 "${srcdir}/logo-512.png" "${pkgdir}/usr/share/icons/hicolor/512x512/apps/dev.bnema.Dumber.png"' \
115 ' install -Dm644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"' \
116 '}' \
117 > pkgbuild/dumber-browser-bin/PKGBUILD
118
119 echo "Generated PKGBUILD:"
120 cat pkgbuild/dumber-browser-bin/PKGBUILD
121
122 - name: Publish dumber-browser-bin to AUR
123 uses: KSXGitHub/github-actions-deploy-aur@v4.1.1
124 with:
125 pkgname: dumber-browser-bin
126 pkgbuild: ./pkgbuild/dumber-browser-bin/PKGBUILD
127 commit_username: ${{ secrets.AUR_USERNAME }}
128 commit_email: ${{ secrets.AUR_EMAIL }}
129 ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
130 commit_message: "Update to ${{ steps.release.outputs.version }}"
131 ssh_keyscan_types: rsa,ecdsa,ed25519