Context
threshold's release-build.yml has a useful pattern: when triggered via workflow_dispatch without a manual tag, it reads the version from apps/threshold/package.json:
version="$(node -p "require('./apps/threshold/package.json').version")"
echo "tag_name=v$version" >> "$GITHUB_OUTPUT"
This repo's release.yml requires a tag for tag-triggered releases and a manually entered tag for workflow_dispatch. There's no fallback to read the version from package.json.
Proposal
Add a package.json version fallback to the prepare-release job's Resolve release tag step:
if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then
TAG="${{ inputs.release_tag }}"
if [[ -z "${TAG}" ]]; then
# Fallback: read version from package.json
TAG="v$(node -p "require('./package.json').version")"
fi
fi
This allows maintainers to trigger a release without manually entering a version — the workflow infers it from the source of truth.
Acceptance Criteria
Context
threshold's
release-build.ymlhas a useful pattern: when triggered viaworkflow_dispatchwithout a manual tag, it reads the version fromapps/threshold/package.json:This repo's
release.ymlrequires a tag for tag-triggered releases and a manually entered tag forworkflow_dispatch. There's no fallback to read the version frompackage.json.Proposal
Add a package.json version fallback to the
prepare-releasejob'sResolve release tagstep:This allows maintainers to trigger a release without manually entering a version — the workflow infers it from the source of truth.
Acceptance Criteria
workflow_dispatchinputrelease_tagis no longer required (or has a blank default)package.json