Context
threshold's release-build.yml has a useful pattern: when triggered via workflow_dispatch without a manual tag, it reads the version from package.json:
version="$(node -p "require('./apps/threshold/package.json').version")"
This repo's publish-desktop.yml requires a release_tag input for workflow_dispatch. There's no fallback to read the version from the workspace's package.json.
Proposal
Add a package.json version fallback to the prepare-release job:
if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then
TAG="${{ inputs.release_tag }}"
if [[ -z "${TAG}" ]]; then
TAG="desktop-v$(node -p "require('./apps/desktop/package.json').version")"
fi
fi
Apply the same pattern to build-android.yml for android-v* tags.
Acceptance Criteria
Context
threshold's
release-build.ymlhas a useful pattern: when triggered viaworkflow_dispatchwithout a manual tag, it reads the version frompackage.json:version="$(node -p "require('./apps/threshold/package.json').version")"This repo's
publish-desktop.ymlrequires arelease_taginput forworkflow_dispatch. There's no fallback to read the version from the workspace's package.json.Proposal
Add a package.json version fallback to the
prepare-releasejob:Apply the same pattern to
build-android.ymlforandroid-v*tags.Acceptance Criteria
workflow_dispatchinputs allow blank tag (fallback to package.json)apps/desktop/package.json