maint(resources): move npm package publishing to GitHub Actions#15029
maint(resources): move npm package publishing to GitHub Actions#15029
Conversation
User Test ResultsTest specification and instructions User tests are not required Test Artifacts
|
bc2477c to
bbc5ffe
Compare
bbc5ffe to
069ec31
Compare
069ec31 to
def72a9
Compare
|
Once this is merged, I can test the action (the .yml needs to be on master). I can see the build trigger ran: But of course nothing happened because the .yml is not yet on master. |
def72a9 to
bc1dea7
Compare
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
bc1dea7 to
ba41177
Compare
darcywong00
left a comment
There was a problem hiding this comment.
some minor questions
| # Keyman is copyright (C) SIL Global. MIT License. | ||
| # | ||
| # List of all NPM packages that need to be published | ||
| # |
There was a problem hiding this comment.
Do we we list packages that are no longer maintained? (from previous refactoring?)
These 3 haven't been updated for 9+ months:
There was a problem hiding this comment.
No, I don't think they are important to list here
| # Publish all the @keymanapp packages listed in npm-packages.inc.sh | ||
| # | ||
| # If the `--dry-run` option is available and specified as a command-line | ||
| # parameter, will do a dry run |
There was a problem hiding this comment.
Should we mention
publish must use --dry-run flag for local or test builds
There was a problem hiding this comment.
Could do, but the script will tell you anyway :D
| ``` | ||
| Once the build succeeds and the tests pass, you can publish! Add the package to | ||
| `resources/build/ci/npm-packages.inc.sh` and it will be published in the next | ||
| alpha release build. |
There was a problem hiding this comment.
Do the npm packages follow $KEYMAN_TIER?
|
Changes in this pull request will be available for download in Keyman version 19.0.147-alpha |
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 Cherry-pick-of: #15029
This commit collects all changes to npm-publish.yml and npm-publish.sh, from the series of PRs associated with PR #15029.
| # TODO: this should really be somewhere else, but right now Developer CI is | ||
| # responsible for pulling the publish lever | ||
|
|
||
| readonly PACKAGES=( |
There was a problem hiding this comment.
Might be good to rename to NPM_PACKAGES at some point.
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 packed 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