Skip to the content.

Building and Releasing the Trice Tools

Contents

1. Build Trice tool from Go sources

Use ./scripts/testAll.sh for the standard Bind checks. For target-code tests only, use ./scripts/_640_test_pc_targets_bind.sh quick or full; ./scripts/_630_test_pc_targets_insert.sh provides the legacy Insert/Clean variant. These wrappers prepare IDs and restore the starting source and metadata state. Direct go test calls inside _test require a matching prepared state; see target-test instructions. The full matrix can take many minutes.

ms@DESKTOP-7POEGPB MINGW64 /c/repos/trice (main)
$ go install ./cmd/trice ./cmd/tlog

This direct local command also builds both tools, using Go’s GOBIN/GOPATH installation directory.

Prefer bash ./scripts/buildTriceTool.sh for metadata and overwrite protection. It includes the current repository state in both binaries, shown by trice version and tlog --version.

2. Prepare A Release

Prerequisite: Installed goreleaser.

2.1. Check a GoReleaser Release before Publishing

By cloning the Trice repo into an empty folder, you make sure no other files exist in the Trice folder.

mkdir ./tmp
cd /tmp
git clone https://github.com/rokath/trice.git
cd trice
goreleaser release --clean --snapshot --skip=publish

This just generates the artifacts locally in /tmp/trice/dist using the ./trice/.goreleaser.yaml copy in ./temp/trice.

Alternatively you can do in your local Trice clone directly, by removing everything not a part of the Trice repo, if you are sure not to loose any data:

git status
git clean -xfd
goreleaser release --clean --snapshot --skip=publish

Explanation:

What you should see:

If this succeeds, you’ve already tested 90% of what CI will do for a real release. If it fails, fix the problem locally first (missing files, bad paths, etc.) – it would fail the same way in CI.

3. Publish a Release Manually from a Selected Tag

The release workflow runs only when started manually. Publishing a Git tag makes the selected source snapshot available; the separate workflow start publishes its release assets.

3.1. Verify the Candidate Commit

Review the release notes, commit the intended changes and run the final checks on that fixed state:

git status
./scripts/testAll.sh full
git status

The test summary must pass, including source-state restoration. Check any skips explicitly. This run builds the local snapshot packages, verifies their licenses, and exercises Bind, Context Enrichment and structured output using the unpacked host tools and target sources. Run the installation workflow on the same candidate to check Linux, macOS and Windows.

3.2. Create and Transfer the Release Tag

Use an annotated tag on the approved commit. For the first v2 beta:

git tag -a v2.0.0-beta-1 -m "Trice v2.0.0-beta-1"
git push origin v2.0.0-beta-1

Transfer the branch containing the updated workflows as well. Keep the tag fixed after publishing so its sources, tool metadata and documentation continue to describe the same release.

3.3. Start the Release Workflow

In GitHub Actions, open goreleaser, choose Run workflow, select the branch containing the approved pipeline, and enter v2.0.0-beta-1 in the required tag field.

The workflow checks out refs/tags/<tag>, checks its commit, and explicitly passes that tag to GoReleaser. The workflow branch selects the pipeline; the tag selects the sources and release version. An equivalent CLI invocation, using wip as the workflow branch, is:

gh workflow run goreleaser.yml --ref wip -f tag=v2.0.0-beta-1

The workflow uses the selected version’s section in CHANGELOG.md as the release notes; a missing or empty section stops publication. Wait for the Run GoReleaser and Verify generated release artifacts steps to succeed. During the v2 beta phase, the release configuration marks releases as prereleases.

3.4. Inspect the Published Assets

Open the release with the selected tag and check:

3.5. Audit That Exact Release

Start release-audit manually with the same tag. For example:

gh workflow run release-audit.yml --ref wip -f tag=v2.0.0-beta-1

The audit downloads that release explicitly and tests its archives, packages, target sources and PDFs. The host archive jobs also compile the PC feature tour against the unpacked target library, then verify text, JSON and KV with both shipped tools. Missing artifacts, changed licenses, incorrect fields or non-record JSON stdout fail the audit.

3.6. Install a Beta or a Stable Release

For a beta, download the matching platform archive from its tagged release and place its tools in PATH, or build from a checkout of that tag. Use the matching target sources and manuals.

The module remains github.com/rokath/trice. Versioned remote installation with a v2 tag is not supported without a /v2 module path; use the archive or local checkout build described above. See Go major version suffixes.

Homebrew remains the stable-release route. skip_upload: auto prevents prerelease tags from updating the normal tap, and beta audits skip the Homebrew job. Before publishing a stable v2 release, review release.prerelease and the stable installation checks explicitly.

(back to top)