Skip to content

Publish a signed APT repository to GitHub Pages on release - #723

Open
neph1 wants to merge 1 commit into
jMonkeyEngine:masterfrom
neph1:push_to_apt
Open

neph1 wants to merge 1 commit into
jMonkeyEngine:masterfrom
neph1:push_to_apt

Conversation

@neph1

@neph1 neph1 commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the "future step" from #449: distribute the SDK as a real APT repository so Debian/Ubuntu users can sudo apt install jmonkeyengine-sdk and get updates via apt upgrade.

  • installers/publish-apt-repo.sh — collects the .deb files from dist/installers, builds a standard Debian archive layout (pool/main, dists/stable/main/binary-<arch>/Packages[.gz], Release), signs it (Release.gpg + InRelease) with a GPG key provided via secrets, exports the public key as jmonkeyengine-repo.asc, and stages everything for Pages.
  • .github/actions/publish-apt-repo/action.yml — composite action: installs dpkg-dev/apt-utils, downloads the installers-Linux-* artifacts, runs the script with APT_REPO_GPG_PRIVATE_KEY / APT_REPO_GPG_PASSPHRASE secrets, uploads the repo as an artifact, and deploys to GitHub Pages (configure-pages + upload-pages-artifact + deploy-pages).
  • .github/workflows/release.yml — new apt-repo job (needs package, environment github-pages, permissions pages: write, id-token: write), running alongside the existing release job.
  • readme.md — documents the 3-command install for end users.

No changes to the .deb packages themselves are needed: they already bundle their own JRE, so there are no system dependencies to declare.

One-time setup required (maintainer)

  1. Generate a dedicated signing key: gpg --quick-gen-key "jMonkeyEngine APT Repository <contact@jmonkeyengine.org>" rsa3072 sign 0 and store the armored private key in the APT_REPO_GPG_PRIVATE_KEY secret and its passphrase in APT_REPO_GPG_PASSPHRASE (repo secrets).
  2. Enable GitHub Pages with source "GitHub Actions" (Settings → Pages).

After that, every tag push publishes/updates the repo at https://jmonkeyengine.github.io/sdk.

Verification

Tested locally in this sandbox with two dummy .debs (amd64 + arm64) and a throwaway GPG key:

  • installers/publish-apt-repo.sh builds the full layout: pool/main/*.deb, dists/stable/main/binary-{amd64,arm64}/Packages{,.gz}, dists/stable/{Release,Release.gpg,InRelease}, jmonkeyengine-repo.asc.
  • apt-get update against the generated repo verifies the InRelease signature and lists jmonkeyengine-sdk 3.10.0.beta2-1 from the correct pool path; apt-get install --download-only jmonkeyengine-sdk fetches the .deb successfully.
  • release.yml and the new action YAML parse cleanly.
  • One bug was found and fixed during testing: dpkg-scanpackages was invoked with an absolute pool path, which leaked absolute paths into the Filename: fields; it now runs relative to the repo root so apt resolves packages correctly.

Relates to #449

Adds an apt-repo job to the release workflow that collects the .deb
installers (amd64 + arm64), builds a standard Debian archive layout
(pool/ + dists/stable with Packages, Packages.gz, Release), signs it
(Release.gpg + InRelease) with a GPG key from the APT_REPO_GPG_PRIVATE_KEY
and APT_REPO_GPG_PASSPHRASE secrets, exports the public key as
jmonkeyengine-repo.asc and deploys everything to GitHub Pages.

Users can then install and update the SDK with the commands documented
in readme.md. One-time setup required: enable GitHub Pages (source:
GitHub Actions) and create the two secrets.

Relates to jMonkeyEngine#449

Co-authored-by: neph1 <neph1@users.noreply.github.com>
echo ">> Architectures: $archs"

for arch in $archs; do
arch_dir="$out_dir/dists/$suite/$component/binary-$arch"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Using an APT repository is a fantastic improvement for Debian/Ubuntu users.

One quick question regarding installers/publish-apt-repo.sh: Is there a reason you chose stable as the suite name? Often, it's common to use stable or main depending on the project's release model, but I wanted to make sure this aligns with the team's plans for distribution. Also, have you verified if the repository path handles potential future versions (e.g., testing, unstable) gracefully, or are we intentionally keeping it simple for now?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense to only release stable versions to apt. We mostly do stable releases, anyway.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes total sense! Keeping it focused on stable releases is super clean and fits the workflow well. Thanks for clarifying!

@jaime-jmebot jaime-jmebot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Added a signed APT repository publishing workflow and GitHub Pages deployment.
  • Provided clear installation documentation for Debian/Ubuntu users.
  • Verified packaging layout and script mechanics.

@jaime-jmebot jaime-jmebot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have replied to neph1's comment on the PR discussion thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants