Files
app__cliphoard/RELEASING.md
2026-09-22 16:24:34 +02:00

4.0 KiB

Cliphoard release procedure

Run releases from the repository root. The process produces a source tag, release binary, Debian package, checksums, and a Gitea release.

Prepare

git switch main
git pull --ff-only
git status --short

Choose the next semantic version, such as 1.2.0, and matching tag v1.2.0. Update the version in Cargo.toml, the root cliphoard package in Cargo.lock, packaging/debian/control, packaging/build-deb.sh, and the versioned .deb names in README.md. Review changes since the previous tag and write notes covering features, fixes, breaking changes, migration needs, passphrase behavior, and platform requirements.

Verify and build

cargo fmt --all -- --check
cargo test --locked --all-features
cargo clippy --locked --all-features -- -D warnings
cargo build --release --locked --features gui
CLIPHOARD_VERSION=1.2.0 packaging/build-deb.sh
dpkg-deb --info target/cliphoard_1.2.0_amd64.deb
dpkg-deb --contents target/cliphoard_1.2.0_amd64.deb
sha256sum target/cliphoard_1.2.0_amd64.deb target/release/cliphoard > target/cliphoard_1.2.0_SHA256SUMS

The isolated package path is:

docker build -t cliphoard-builder .
docker run --rm -v "$PWD/target:/out" cliphoard-builder

Do not commit target/; retain the exact package, binary, and checksum files for upload.

Commit and tag

Only commit after the gates pass:

git diff --check
git status --short
git add Cargo.toml Cargo.lock README.md packaging/debian/control packaging/build-deb.sh src .agents RELEASING.md
git commit -m "Release Cliphoard 1.2.0"
git tag -a v1.2.0 -m "Release Cliphoard 1.2.0"

Replace 1.2.0 and v1.2.0 with the actual version.

Push Git

Confirm the remote has not moved since the preparation pull. Never force-push:

git show --stat --oneline HEAD
git show --no-patch --decorate HEAD
git push origin main
git push origin v1.2.0

If the remote changed, stop and reconcile it before pushing.

Publish on Gitea

Pushing Git does not upload ignored target/ files. Create a release for the pushed tag and attach:

  • target/cliphoard_1.2.0_amd64.deb
  • target/release/cliphoard
  • target/cliphoard_1.2.0_SHA256SUMS

Using the Gitea web UI: open Releases, choose New Release, select v1.2.0, enter Cliphoard 1.2.0, paste the release notes, upload all three files, and publish. Include breaking changes and the plaintext-database deletion warning and commands from README.md.

For API automation, create a repository release-write token and set the installation-specific values without committing them:

GITEA_URL="https://gitea.example.com"
GITEA_OWNER="owner"
GITEA_REPO="cliphoard"
GITEA_TOKEN="..."
VERSION="1.2.0"
TAG="v${VERSION}"

Create the release, then upload each artifact:

release_json=$(curl --fail-with-body -sS \
  -H "Authorization: token ${GITEA_TOKEN}" \
  -H 'Content-Type: application/json' \
  -d "$(jq -n --arg tag "$TAG" --arg name "Cliphoard $VERSION" --arg body "$(cat RELEASE_NOTES.md)" \
      '{tag_name:$tag,target_commitish:"main",name:$name,body:$body,draft:false,prerelease:false}')" \
  "${GITEA_URL}/api/v1/repos/${GITEA_OWNER}/${GITEA_REPO}/releases"
release_id=$(jq -r '.id' <<<"$release_json")
for artifact in "target/cliphoard_${VERSION}_amd64.deb" "target/release/cliphoard" "target/cliphoard_${VERSION}_SHA256SUMS"; do
  curl --fail-with-body -sS -H "Authorization: token ${GITEA_TOKEN}" \
    -F "attachment=@${artifact}" \
    "${GITEA_URL}/api/v1/repos/${GITEA_OWNER}/${GITEA_REPO}/releases/${release_id}/assets?name=$(basename "$artifact")"
done

Never put a token in the repository, shell history, or release notes. If no authenticated Gitea web session or API token is available, stop after the Git push and resume at publication.

Final smoke check

On a clean machine, install the exact .deb, start Cliphoard, create/unlock the encrypted database, and check tray, popup, autostart, settings, and passphrase flows. Verify artifacts against cliphoard_1.2.0_SHA256SUMS and record the release URL, tag, checksums, and test results.