main 5041353

aur.yml RawHistoryFolder

1name: AUR Publish
2
3# This workflow publishes both AUR packages:
4# - dumber-browser-bin: Published after Flatpak workflow completes (on release)
5# - dumber-browser-git: Published after CI workflow completes on main branch
6
7on:
8  workflow_run:
9    workflows: ["CI", "Flatpak"]
10    types:
11      - completed
12
13jobs:
14  publish-aur-git:
15    name: Publish dumber-browser-git to AUR
16    runs-on: ubuntu-latest
17    # AUR packages are published from ermite only (git.bnema.dev).
18    if: >
19      github.server_url != 'https://github.com' &&
20      github.event.workflow_run.name == 'CI' &&
21      github.event.workflow_run.conclusion == 'success' &&
22      github.event.workflow_run.head_branch == 'main'
23    concurrency:
24      group: aur-git-publish
25      cancel-in-progress: true
26
27    steps:
28      - uses: actions/checkout@v7.0.1
29        with:
30          ref: ${{ github.event.workflow_run.head_sha }}
31          fetch-depth: 0
32
33      - name: Calculate pkgver
34        id: pkgver
35        run: |
36          # Use same logic as PKGBUILD pkgver() function
37          PKGVER=$(git describe --long --tags 2>/dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' || echo "0.0.0.r$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)")
38          echo "version=${PKGVER}" >> $GITHUB_OUTPUT
39          echo "Calculated pkgver: ${PKGVER}"
40
41      - name: Generate PKGBUILD for dumber-browser-git
42        run: |
43          PKGVER="${{ steps.pkgver.outputs.version }}"
44          
45          mkdir -p pkgbuild/dumber-browser-git
46          
47          printf '%s\n' \
48            '# Maintainer: bnema <b at bnema dot dev>' \
49            'pkgname=dumber-browser-git' \
50            "pkgver=${PKGVER}" \
51            'pkgrel=1' \
52            'pkgdesc="A minimal keyboard-driven browser for tiling WMs (git version)"' \
53            "arch=('x86_64')" \
54            'url="https://git.bnema.dev/dumber"' \
55            "license=('MIT')" \
56            "makedepends=('go>=1.27' 'git' 'brotli')" \
57            "depends=('gtk4' 'cef' 'webkitgtk-6.0')" \
58            'optdepends=(' \
59            "    'gst-plugins-base: Base media codecs'" \
60            "    'gst-plugins-good: Additional media codecs'" \
61            "    'gst-plugins-bad: Extended media codecs'" \
62            "    'gst-plugins-ugly: Patented media codecs'" \
63            "    'gst-libav: FFmpeg-based codecs'" \
64            "    'gst-plugin-pipewire: PipeWire audio support'" \
65            "    'gst-plugin-va: Hardware video decoding (VA-API stateless decoders)'" \
66            "    'cef-vaapi-bin: Prebuilt CEF provider with VA-API hardware video decoding support'" \
67            "    'cef-vaapi: Source-built CEF provider with VA-API hardware video decoding support'" \
68            "    'pipewire: Audio/video routing'" \
69            "    'pipewire-pulse: PulseAudio replacement'" \
70            "    'mesa: VA-API driver for AMD GPUs'" \
71            "    'libva-nvidia-driver: VA-API driver for NVIDIA GPUs'" \
72            "    'libva-intel-driver: VA-API driver for older Intel GPUs'" \
73            "    'intel-media-driver: VA-API driver for newer Intel GPUs (Broadwell+)'" \
74            ')' \
75            "provides=('dumber-browser' 'dumber')" \
76            "conflicts=('dumber-browser' 'dumber-browser-bin')" \
77            'source=("git+https://git.bnema.dev/dumber.git")' \
78            "sha256sums=('SKIP')" \
79            '' \
80            'pkgver() {' \
81            '    cd dumber' \
82            '    git describe --long --tags 2>/dev/null | sed '"'"'s/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'"'"' || echo "0.0.0.r$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)"' \
83            '}' \
84            '' \
85            'build() {' \
86            '    cd dumber' \
87            '    export CGO_ENABLED=0' \
88            '    # Keep global GOFLAGS wasm-safe; apply PIE only to native Go builds.' \
89            '    export GOFLAGS="-trimpath -mod=readonly -modcacherw"' \
90            '    export NATIVE_GOFLAGS="${GOFLAGS} -buildmode=pie"' \
91            '    make build' \
92            '}' \
93            '' \
94            'package() {' \
95            '    cd dumber' \
96            '    install -Dm755 dist/dumber "${pkgdir}/usr/bin/dumber"' \
97            '    install -Dm644 flatpak/dev.bnema.Dumber.desktop "${pkgdir}/usr/share/applications/dev.bnema.Dumber.desktop"' \
98            '    install -Dm644 assets/logo-512.png "${pkgdir}/usr/share/icons/hicolor/512x512/apps/dev.bnema.Dumber.png"' \
99            '    install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"' \
100            '}' \
101            > pkgbuild/dumber-browser-git/PKGBUILD
102          
103          echo "Generated PKGBUILD:"
104          cat pkgbuild/dumber-browser-git/PKGBUILD
105
106      - name: Publish dumber-browser-git to AUR
107        uses: KSXGitHub/github-actions-deploy-aur@v4.2.0
108        with:
109          pkgname: dumber-browser-git
110          pkgbuild: ./pkgbuild/dumber-browser-git/PKGBUILD
111          commit_username: ${{ secrets.AUR_USERNAME }}
112          commit_email: ${{ secrets.AUR_EMAIL }}
113          ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
114          commit_message: "Update to ${{ steps.pkgver.outputs.version }}"
115          ssh_keyscan_types: rsa,ecdsa,ed25519
116
117  publish-aur-bin:
118    name: Publish dumber-browser-bin to AUR
119    runs-on: ubuntu-latest
120    if: >
121      github.server_url != 'https://github.com' &&
122      github.event.workflow_run.name == 'Flatpak' &&
123      github.event.workflow_run.conclusion == 'success'
124    concurrency:
125      group: aur-bin-publish-${{ github.event.workflow_run.head_branch }}
126      cancel-in-progress: true
127
128    steps:
129      - uses: actions/checkout@v7.0.1
130        with:
131          fetch-depth: 0
132
133      - name: Get release info
134        id: release
135        run: |
136          TAG=$(git describe --tags --abbrev=0)
137          VERSION=${TAG#v}
138          echo "tag=${TAG}" >> $GITHUB_OUTPUT
139          echo "version=${VERSION}" >> $GITHUB_OUTPUT
140          echo "Publishing AUR package for $TAG (version $VERSION)"
141
142      - name: Wait 1 hour before publishing
143        run: |
144          echo "Waiting 1 hour before publishing to AUR..."
145          echo "This gives time to cancel if there are issues with the release."
146          echo "Started at: $(date -u)"
147          sleep 3600
148          echo "Wait complete at: $(date -u)"
149
150      - name: Verify release still exists
151        run: |
152          TAG="${{ steps.release.outputs.tag }}"
153          if ! curl -fsS -o /dev/null "${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/releases/tags/${TAG}"; then
154            echo "::error::Release $TAG no longer exists. Aborting AUR publish."
155            exit 1
156          fi
157          echo "Release $TAG verified, proceeding with AUR publish."
158
159      - name: Download checksums
160        id: checksum
161        run: |
162          TAG="${{ steps.release.outputs.tag }}"
163          curl -fsSL "${GITHUB_SERVER_URL}/dumber/releases/download/${TAG}/checksums.txt" -o checksums.txt
164          cat checksums.txt
165          SHA256=$(grep 'dumber_linux_x86_64.tar.gz' checksums.txt | cut -d' ' -f1)
166          if [ -z "$SHA256" ]; then
167            echo "::error::Failed to extract SHA256 from checksums.txt"
168            exit 1
169          fi
170          echo "sha256=${SHA256}" >> $GITHUB_OUTPUT
171          echo "SHA256: ${SHA256}"
172
173      - name: Generate PKGBUILD for dumber-browser-bin
174        run: |
175          VERSION="${{ steps.release.outputs.version }}"
176          SHA256="${{ steps.checksum.outputs.sha256 }}"
177          
178          mkdir -p pkgbuild/dumber-browser-bin
179          
180          # Write PKGBUILD using printf to avoid heredoc issues
181          printf '%s\n' \
182            '# Maintainer: bnema <b at bnema dot dev>' \
183            'pkgname=dumber-browser-bin' \
184            "pkgver=${VERSION}" \
185            'pkgrel=1' \
186            'pkgdesc="A minimal keyboard-driven browser for tiling WMs"' \
187            "arch=('x86_64')" \
188            'url="https://git.bnema.dev/dumber"' \
189            "license=('MIT')" \
190            "depends=('gtk4' 'cef' 'webkitgtk-6.0')" \
191            'optdepends=(' \
192            "    'gst-plugins-base: Base media codecs'" \
193            "    'gst-plugins-good: Additional media codecs'" \
194            "    'gst-plugins-bad: Extended media codecs'" \
195            "    'gst-plugins-ugly: Patented media codecs'" \
196            "    'gst-libav: FFmpeg-based codecs'" \
197            "    'gst-plugin-pipewire: PipeWire audio support'" \
198            "    'gst-plugin-va: Hardware video decoding (VA-API stateless decoders)'" \
199            "    'cef-vaapi-bin: Prebuilt CEF provider with VA-API hardware video decoding support'" \
200            "    'cef-vaapi: Source-built CEF provider with VA-API hardware video decoding support'" \
201            "    'pipewire: Audio/video routing'" \
202            "    'pipewire-pulse: PulseAudio replacement'" \
203            "    'mesa: VA-API driver for AMD GPUs'" \
204            "    'libva-nvidia-driver: VA-API driver for NVIDIA GPUs'" \
205            "    'libva-intel-driver: VA-API driver for older Intel GPUs'" \
206            "    'intel-media-driver: VA-API driver for newer Intel GPUs (Broadwell+)'" \
207            ')' \
208            "provides=('dumber-browser' 'dumber')" \
209            "conflicts=('dumber-browser' 'dumber-browser-git')" \
210            'source=("${pkgname}-${pkgver}.tar.gz::https://git.bnema.dev/dumber/releases/download/v${pkgver}/dumber_linux_x86_64.tar.gz")' \
211            "sha256sums=('${SHA256}')" \
212            '' \
213            'package() {' \
214            '    cd "${srcdir}/dumber_${pkgver}"' \
215            '    install -Dm755 dumber "${pkgdir}/usr/bin/dumber"' \
216            '    install -Dm644 dev.bnema.Dumber.desktop "${pkgdir}/usr/share/applications/dev.bnema.Dumber.desktop"' \
217            '    install -Dm644 logo-512.png "${pkgdir}/usr/share/icons/hicolor/512x512/apps/dev.bnema.Dumber.png"' \
218            '    install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"' \
219            '}' \
220            > pkgbuild/dumber-browser-bin/PKGBUILD
221          
222          echo "Generated PKGBUILD:"
223          cat pkgbuild/dumber-browser-bin/PKGBUILD
224
225      - name: Publish dumber-browser-bin to AUR
226        uses: KSXGitHub/github-actions-deploy-aur@v4.2.0
227        with:
228          pkgname: dumber-browser-bin
229          pkgbuild: ./pkgbuild/dumber-browser-bin/PKGBUILD
230          commit_username: ${{ secrets.AUR_USERNAME }}
231          commit_email: ${{ secrets.AUR_EMAIL }}
232          ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
233          commit_message: "Update to ${{ steps.release.outputs.version }}"
234          ssh_keyscan_types: rsa,ecdsa,ed25519

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close