Skip to content

Releasing

Releases are GitHub releases on redacid/DevOpsTools with three Linux packages attached. They are built by CI when a version tag is pushed.

Versioning

  • The version lives in package.json and nowhere else. Package file names, the release tag and devopstools --version all come from it.
  • Tags are bare semver, without a v prefix: 0.4.0, 0.4.1, 1.0.0-rc.1. This matches the earlier Kotlin releases (0.1.0 … 0.3.0).
  • CI refuses to build when the tag and package.json disagree.

Release with CI (normal path)

  1. Bump the version and commit it:
make set-version V=0.4.1
git commit -am "Release 0.4.1"
git push origin main
  1. Tag and push the tag:
make release

make release refuses to run with uncommitted changes, creates a GPG-signed tag for the package.json version (git tag -s -u $GPG_KEY, default E4EBB456A31DF880), verifies it and pushes it. Use another key with make release GPG_KEY=<id>.

  1. The Release workflow then:
  2. verifies the tag signature against .github/release-signers.asc (an unsigned tag, or one signed by any other key, stops the release);
  3. checks that the tag equals the package.json version;
  4. runs npm ci, typecheck, ESLint, the unit tests and the UI tests (under Xvfb);
  5. builds the deb, rpm and AppImage packages with electron-builder;
  6. creates the GitHub release with auto-generated notes and uploads the packages. If a release for the tag already exists, it only re-uploads the files (--clobber).

  7. Check the run under Actions → Release and the files on the release page.

Release artifacts

File Format
devopstools_<version>_amd64.deb Debian / Ubuntu / Mint
devopstools_<version>_x86_64.rpm Fedora / RHEL / openSUSE
devopstools_<version>_x86_64.AppImage Any distro, no install
SHA256SUMS, SHA256SUMS.sig Checksums and signature

Keep these names as they are. The devopstools entry in the package list (tasks branch, tasks.json) finds the right file with the asset pattern *devopstools*amd64*.deb, so the app can update itself. The deb/rpm package name is devopstools, so a new version upgrades the installed one, including the old Kotlin 0.3.0 package.

Signing

Release tags (GPG)

Only tags signed by a key in .github/release-signers.asc are built. To add a signer, append the public key to that file and commit it:

gpg --export --armor <key id> >> .github/release-signers.asc

Check a tag by hand with git verify-tag 0.6.0.

Release files (Ed25519)

Releases carry SHA256SUMS and SHA256SUMS.sig, an Ed25519 signature of it. The public key is built into the app (resources/release-signing.pub.pem), and self-update refuses a release whose signature or checksum doesn't match. Without a committed public key, releases are unsigned and updates rely on GitHub's asset checksums.

One-time setup:

make signing-key   # writes resources/release-signing.pub.pem and the private key under ~/.config/devopstools/
gh secret set RELEASE_SIGNING_KEY --repo redacid/DevOpsTools < ~/.config/devopstools/release-signing.key.pem
git add resources/release-signing.pub.pem && git commit -m "Add release signing key"

Back up the private key. The workflow fails if the public key is committed but the secret is missing, since installed apps would then refuse the update.

Verify a release by hand:

openssl pkeyutl -verify -pubin -inkey resources/release-signing.pub.pem -rawin \
  -in SHA256SUMS -sigfile <(base64 -d SHA256SUMS.sig)
sha256sum -c SHA256SUMS --ignore-missing

Fixing a failed release

  • The workflow failed before uploading (tests, build): fix it on main, then move the tag to the fixed commit and push it again. This re-runs the workflow:
git tag -f -s -u E4EBB456A31DF880 -m "Release 0.4.1" 0.4.1
git push -f origin 0.4.1
  • The tag doesn't match package.json: delete the tag, bump the version, tag again:
git push origin :refs/tags/0.4.1
git tag -d 0.4.1
make set-version V=0.4.1
git commit -am "Release 0.4.1"
git push origin main
make release
  • Re-run without changes: use Re-run jobs on the workflow run in GitHub Actions.

Release without CI (fallback)

Builds locally and publishes with the GitHub CLI. Needs gh auth login and, for the rpm, rpmbuild (sudo apt install rpm).

make git-publish

This runs clean-workspace, package, git-release and git-upload-release.

Warning: git-release deletes any existing release and its tag for the current version before creating it again. Run it only for a version that hasn't been released, or one you intend to replace.

Creating the release from the CLI also creates the tag on GitHub, which triggers the Release workflow. That is harmless: the workflow sees the existing release and re-uploads the same files.

Testing packages locally

make package       # all three into dist/
make install-deb   # build the deb and install it with apt (needs sudo)
./dist/devopstools_$(node -p "require('./package.json').version")_x86_64.AppImage