main 5041353

flatpak.yml RawHistoryFolder

1name: Flatpak
2
3on:
4  push:
5    tags:
6      - 'v*'
7  workflow_dispatch:
8    inputs:
9      tag:
10        description: 'Release tag to build (e.g., v0.23.0)'
11        required: true
12
13permissions:
14  contents: write
15
16jobs:
17  # ermite (git.bnema.dev) builds the Flatpak; the GitHub mirror only gets a
18  # copy of the release for older updaters (see release.yml).
19  flatpak:
20    name: Build Flatpak
21    if: github.server_url != 'https://github.com'
22    runs-on: ubuntu-latest
23    container:
24      image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48
25      options: --privileged
26    steps:
27      - uses: actions/checkout@v7.0.1
28
29      - name: Get version
30        id: version
31        run: |
32          if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
33            VERSION="${{ github.event.inputs.tag }}"
34          else
35            VERSION="${GITHUB_REF#refs/tags/}"
36          fi
37          echo "version=$VERSION" >> $GITHUB_OUTPUT
38          echo "Building Flatpak for version: $VERSION"
39
40      - name: Wait for release assets
41        run: |
42          VERSION="${{ steps.version.outputs.version }}"
43          # The job reaches the forge at GITHUB_SERVER_URL (the runner relay).
44          URL="${GITHUB_SERVER_URL}/dumber/releases/download/${VERSION}/dumber_linux_x86_64.tar.gz"
45          echo "Waiting for release asset: $URL"
46          for i in $(seq 1 30); do
47            if curl -sL --fail -o /dev/null "$URL"; then
48              echo "Release asset available!"
49              exit 0
50            fi
51            echo "Attempt $i/30: Asset not ready, waiting 10s..."
52            sleep 10
53          done
54          echo "Timeout waiting for release asset"
55          exit 1
56
57      - name: Download and compute SHA256
58        id: sha256
59        run: |
60          VERSION="${{ steps.version.outputs.version }}"
61          # The job reaches the forge at GITHUB_SERVER_URL (the runner relay).
62          URL="${GITHUB_SERVER_URL}/dumber/releases/download/${VERSION}/dumber_linux_x86_64.tar.gz"
63          SHA256=$(curl -sL "$URL" | sha256sum | cut -d' ' -f1)
64          echo "sha256=$SHA256" >> $GITHUB_OUTPUT
65          echo "SHA256: $SHA256"
66
67      - name: Generate manifest
68        run: |
69          VERSION="${{ steps.version.outputs.version }}"
70          SHA256="${{ steps.sha256.outputs.sha256 }}"
71          cat > dev.bnema.Dumber.yml << EOF
72          id: dev.bnema.Dumber
73          runtime: org.gnome.Platform
74          runtime-version: '48'
75          sdk: org.gnome.Sdk
76          command: dumber
77
78          finish-args:
79            - --socket=wayland
80            - --device=dri
81            - --share=network
82            - --socket=pulseaudio
83            - --device=all
84            - --filesystem=xdg-download
85            - --filesystem=home:ro
86            - --filesystem=xdg-run/pipewire-0:ro
87
88          modules:
89            - name: dumber
90              buildsystem: simple
91              build-commands:
92                - install -Dm755 dumber /app/bin/dumber
93                - install -Dm644 dev.bnema.Dumber.desktop /app/share/applications/dev.bnema.Dumber.desktop
94                - install -Dm644 logo.svg /app/share/icons/hicolor/scalable/apps/dev.bnema.Dumber.svg
95                - install -Dm644 logo-512.png /app/share/icons/hicolor/512x512/apps/dev.bnema.Dumber.png
96                - install -Dm644 dev.bnema.Dumber.metainfo.xml /app/share/metainfo/dev.bnema.Dumber.metainfo.xml
97              sources:
98                - type: archive
99                  url: ${GITHUB_SERVER_URL}/dumber/releases/download/${VERSION}/dumber_linux_x86_64.tar.gz
100                  sha256: ${SHA256}
101                - type: file
102                  path: flatpak/dev.bnema.Dumber.desktop
103                  dest-filename: dev.bnema.Dumber.desktop
104                - type: file
105                  path: assets/logo.svg
106                  dest-filename: logo.svg
107                - type: file
108                  path: assets/logo-512.png
109                  dest-filename: logo-512.png
110                - type: file
111                  path: flatpak/dev.bnema.Dumber.metainfo.xml
112                  dest-filename: dev.bnema.Dumber.metainfo.xml
113          EOF
114          echo "Generated manifest:"
115          cat dev.bnema.Dumber.yml
116
117      - uses: flatpak/flatpak-github-actions/flatpak-builder@v6
118        with:
119          bundle: dumber.flatpak
120          manifest-path: dev.bnema.Dumber.yml
121          cache-key: flatpak-builder-${{ steps.version.outputs.version }}
122
123      - name: Upload Flatpak to Release
124        uses: softprops/action-gh-release@v3
125        with:
126          tag_name: ${{ steps.version.outputs.version }}
127          files: dumber.flatpak
128        env:
129          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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