Cookbook · 2 of 3

Build and release

In this tutorial we turn a working package into signed artifacts anyone can verify, built in CI. Two keys are involved and they do different jobs. Read about them before you copy the workflow.

You want toGo to
Create the signing keysMake the two keys, once
Build for 25.12 and 24.10Build both release lines
Sign and write the manifestSign, then write the manifest
Copy a release workflowGitHub Actions · GitLab CI
Check before you publishCheck it before anyone else does

Make the two keys, once

owfeed keygen -o author.pem       # EC prime256v1 — signs the packages
owfeed keygen --usign -o release.key   # usign/ed25519 — signs the release manifest

gh secret set OWFEED_AUTHOR_KEY < author.pem
gh secret set OWFEED_RELEASE_KEY < release.key

git add author.pub.pem release.pub && git commit -m "publish the public halves"
Commit the public halves. Never commit the private ones. A published signing key cannot be revoked: apk has no CRL, no expiry, no way to say a key is dead. Generate the keys outside a git working tree. owfeed keygen refuses to write inside one without --force. Note the key ids it prints: a feed will ask for them.

Why two

KeySignsChecked by
EC (author.pem)inside each .apkanyone, at any time, against your public half
usign (release.key)the release manifesta feed, once, when it ingests your release

The feed checks the usign signature at ingest, and then it is done. The signature never leaves the feed's CI.

The EC signature travels inside the package all the way to the router. Somebody who does not trust the feed can still confirm you built what they installed.

That is the one claim about a package that survives the feed serving it. That is why feeds require it.

Build both release lines

owlab build --release 25.12.5    # apk, for 25.12 and later
owlab build --release 24.10.8    # ipk, for 24.10 and earlier

Both land in dist/<arch>/. An architecture-independent package produces two directories:

dist/
├── noarch/my-app-1.0.0-r1.apk
└── all/my-app_1.0.0-r1_all.ipk

Two directories are correct. apk requires noarch and rejects all. opkg has never heard of noarch.

Build both lines. Routers stay on a release for years, so shipping only 25.12 abandons everyone who has not upgraded.

Build before you release, even if sync worked. luci.mk minifies JS and CSS; owlab sync does not. Code that works unminified and breaks minified is invisible until somebody builds a package.

Sign, then write the manifest

owfeed sign --key env:OWFEED_AUTHOR_KEY
owfeed release --repo "$GITHUB_REPOSITORY" --tag "$GITHUB_REF_NAME"

Keep this order. owfeed release records every package's size and sha256, and signing appends bytes. Reverse them and the manifest describes files that no longer exist.

What the manifest records

owfeed release writes manifest.txt and signs it with your usign key. It records:

It records the repository because a signature proves who wrote something, never what it is about. Without that line, a manifest lifted from another of your releases would verify perfectly as this one.

GitHub Actions

.github/workflows/release.yml

name: release
on:
  push: { tags: ["v*"] }
permissions: { contents: read }
jobs:
  release:
    runs-on: ubuntu-latest
    permissions: { contents: write }
    steps:
      - uses: actions/checkout@v5
      - uses: owfeed/owlab/setup@v0.8.0
      - uses: owfeed/owfeed/setup@v0.5.9

      - run: owlab build --release 25.12.5
      - run: owlab build --release 24.10.8

      - name: Sign the packages, then write the manifest
        env:
          OWFEED_AUTHOR_KEY:  ${{ secrets.OWFEED_AUTHOR_KEY }}
          OWFEED_RELEASE_KEY: ${{ secrets.OWFEED_RELEASE_KEY }}
        run: |
          owfeed sign --key env:OWFEED_AUTHOR_KEY
          owfeed release

      - run: gh release create "${{ github.ref_name }}" --generate-notes
             dist/*/*.apk dist/*/*.ipk dist/manifest.txt*
        env: { GH_TOKEN: ${{ github.token }} }

owfeed release reads the repository and tag from the CI environment, so the flags are only for overriding them:

CIRepositoryTag
GitHubGITHUB_REPOSITORYGITHUB_REF_NAME
GitLabCI_PROJECT_PATHCI_COMMIT_TAG
Keep the signing steps in a job that pull requests cannot reach. A fork's pull request runs your build, and a secret reachable from it is a secret published. Gate on the tag, as above, or use a separate job with an environment:.

GitLab CI

release:
  rules:
    - if: $CI_COMMIT_TAG
  script:
    - wget -qO- https://github.com/owfeed/owlab/releases/download/v0.8.0/owlab_0.8.0_linux_amd64.tar.gz | tar xz
    - wget -qO owfeed https://github.com/owfeed/owfeed/releases/latest/download/owfeed-linux-amd64
    - chmod +x owfeed && export PATH="$PWD:$PATH"
    - owlab build --release 25.12.5
    - owlab build --release 24.10.8
    - owfeed sign --key env:OWFEED_AUTHOR_KEY
    - owfeed release

Check it before anyone else does

owfeed check

owfeed check builds, signs, indexes and runs doctor --require-origin. It uses an EC key and a usign key generated for the run and thrown away. It works in a temporary directory and removes it afterwards.

Run it on every pull request. It needs no signing: block and no secret, so a fork's code never runs beside a real key.

Run owfeed doctor on its own only when you have an indexed tree. It reads out/ and otherwise stops with run owfeed index first. A repository that publishes releases rather than a feed never produces that tree.

Findings that catch most first attempts

Findings are numbered. Each one says what it costs and what to do.

FindingWhat it means
arch: allapk rejects it as uninstallable. Use LUCI_PKGARCH:=all and let the build translate it. OpenWrt's own packaging does the same.
OWF207A /etc/config/* file is shipped but not in conffiles:. On every firmware upgrade, sysupgrade silently replaces the user's settings with your defaults.
Version rejectedAfter ~ apk reads a commit hash, so only hex. Write 1.0_beta1, not 1.0~beta.
Translations missingLuCI reads compiled .lmo and ignores .po. Point i18n.from: at your catalogues.