Due to recent changes in NPM package publishing security requirements,
we have to move from TeamCity build to a GitHub Action to publish our
NPM packages, so we can take advantage of trusted publishing. This
change also consolidates and centralizes the npm publishing into
resources/build/ci/npm-publish.sh, which removes a lot of boilerplate
from each of the build.sh scripts, and ensures consistency.
Packages will be `npm pack`ed on PR and test builds, and published in
release builds.
Ref: https://docs.npmjs.com/trusted-publishers
Ref: https://github.blog/changelog/2025-09-29-strengthening-npm-security-important-changes-to-authentication-and-token-management/Fixes: #14963
Test-bot: skip
Build-bot: release:developer
Use a new flag `--npm-publish` in conjunction with `publish` action,
so that the default will always be to `npm pack` if the new flag is not
specified. This flag is also guarded in the actual npm publish code to
ensure that it can only run in the appropriate CI alpha/beta/stable
environment, and not in local or test.
This then also removes the separate `pack` action.
Also removes legacy boilerplate from a number of build scripts.
1. Renamed form UfrmNGrokOptions to UfrmServerOptions
2. Renamed kmdev-server to just plain server
3. Tidied up npm versioning to use VERSION_WITH_TAG
This last point should help avoid confusion as now only CI release
builds will ever generate a package.json with a.b.c, a.b.c-alpha or
a.b.c-beta. Local and test builds will always have the corresponding
-test or -local environment appended. This also helps avoid issues if
we accidentally publish an incorrect version.