Add Flatpak bundle to the release workflow
Some checks failed
Some checks failed
Builds carrier-x86_64.flatpak from the linux job's already-built binary rather than recompiling inside flatpak-builder's sandbox (which can't see the shared cargo cache anyway, making an in-sandbox build pure duplicate work). com.randogoth.carrier.release.json is a separate manifest from the main one, which stays as-is for local `devbox run package` dev-from-source builds.
This commit is contained in:
parent
1bbc961bd6
commit
2d18caa500
4 changed files with 83 additions and 1 deletions
|
|
@ -69,6 +69,35 @@ jobs:
|
|||
name: carrier-linux-x86_64
|
||||
path: carrier/target/release/carrier-linux-x86_64
|
||||
|
||||
# Packages the linux job's already-built binary instead of recompiling
|
||||
# inside flatpak-builder's own sandbox: that sandbox copies the source
|
||||
# tree in fresh, so it never sees ~/.cargo/registry or target/, making an
|
||||
# in-sandbox cargo build fully redundant with the linux job's build.
|
||||
# com.randogoth.carrier.release.json (not the main manifest, which is
|
||||
# still used by local `devbox run package` for from-source dev builds)
|
||||
# just installs this prebuilt binary instead of invoking cargo.
|
||||
flatpak:
|
||||
needs: [linux]
|
||||
runs-on: linux-x86_64
|
||||
steps:
|
||||
- uses: https://code.forgejo.org/actions/checkout@v4
|
||||
with:
|
||||
path: carrier
|
||||
- uses: https://code.forgejo.org/forgejo/download-artifact@v7
|
||||
with:
|
||||
name: carrier-linux-x86_64
|
||||
path: carrier
|
||||
- run: chmod +x carrier-linux-x86_64
|
||||
working-directory: carrier
|
||||
- run: devbox run bundle-flatpak
|
||||
working-directory: carrier
|
||||
env:
|
||||
GITHUB_TOKEN: ""
|
||||
- uses: https://code.forgejo.org/forgejo/upload-artifact@v5
|
||||
with:
|
||||
name: carrier-x86_64.flatpak
|
||||
path: carrier/carrier-x86_64.flatpak
|
||||
|
||||
# forgejo-release.sh (the engine behind actions/forgejo-release) always
|
||||
# does a blind create-then-upload of the release for the tag, with no
|
||||
# check for one already existing - running it from two parallel jobs
|
||||
|
|
@ -78,7 +107,7 @@ jobs:
|
|||
# produce artifacts; exactly one job, gated on both finishing, does the
|
||||
# single release create + upload.
|
||||
release:
|
||||
needs: [macos, linux]
|
||||
needs: [macos, linux, flatpak]
|
||||
runs-on: linux-x86_64
|
||||
steps:
|
||||
- uses: https://code.forgejo.org/forgejo/download-artifact@v7
|
||||
|
|
|
|||
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -1,6 +1,10 @@
|
|||
/target
|
||||
.flatpak
|
||||
.flatpak-builder
|
||||
.flatpak-repo
|
||||
.flatpak-build
|
||||
*.flatpak
|
||||
carrier-linux-x86_64
|
||||
result
|
||||
result-*
|
||||
*.key
|
||||
|
|
|
|||
45
com.randogoth.carrier.release.json
Normal file
45
com.randogoth.carrier.release.json
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
"id": "com.randogoth.carrier",
|
||||
"runtime": "org.gnome.Platform",
|
||||
"runtime-version": "51",
|
||||
"sdk": "org.gnome.Sdk",
|
||||
"command": "carrier",
|
||||
"finish-args": [
|
||||
"--socket=wayland",
|
||||
"--socket=fallback-x11",
|
||||
"--device=dri",
|
||||
"--share=network"
|
||||
],
|
||||
"cleanup": [
|
||||
"/share/doc"
|
||||
],
|
||||
"modules": [
|
||||
{
|
||||
"name": "carrier",
|
||||
"buildsystem": "simple",
|
||||
"build-commands": [
|
||||
"install -Dm755 carrier-linux-x86_64 /app/bin/carrier",
|
||||
"install -Dm644 data/com.randogoth.carrier.desktop /app/share/applications/com.randogoth.carrier.desktop",
|
||||
"install -Dm644 data/com.randogoth.carrier.metainfo.xml /app/share/metainfo/com.randogoth.carrier.metainfo.xml",
|
||||
"install -Dm644 data/icons/com.randogoth.carrier.png /app/share/icons/hicolor/512x512/apps/com.randogoth.carrier.png",
|
||||
"install -Dm644 data/icons/com.randogoth.carrier-256.png /app/share/icons/hicolor/256x256/apps/com.randogoth.carrier.png",
|
||||
"install -Dm644 data/icons/com.randogoth.carrier-128.png /app/share/icons/hicolor/128x128/apps/com.randogoth.carrier.png"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "dir",
|
||||
"path": ".",
|
||||
"skip": [
|
||||
"target",
|
||||
".git",
|
||||
".jj",
|
||||
".flatpak",
|
||||
".flatpak-builder",
|
||||
".flatpak-repo",
|
||||
".flatpak-build"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -42,6 +42,10 @@
|
|||
],
|
||||
"package": [
|
||||
"flatpak-builder --force-clean --user --install-deps-from=flathub --install .flatpak com.randogoth.carrier.json"
|
||||
],
|
||||
"bundle-flatpak": [
|
||||
"flatpak-builder --force-clean --repo=.flatpak-repo --install-deps-from=flathub .flatpak-build com.randogoth.carrier.release.json",
|
||||
"flatpak build-bundle .flatpak-repo carrier-x86_64.flatpak com.randogoth.carrier"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue