Commit f989a1b
authored
chore(monorepo): Add Github action for set npm token (#2)
This pull request introduces a new custom GitHub Action for securely
setting an npm publish token in the `.npmrc` configuration file,
enabling automated publishing workflows. The action is defined with a
YAML metadata file and implemented in JavaScript.
**New GitHub Action for npm Token Management:**
* Added `.github/actions/set-npm-token/action.yml` to define the
action's metadata, including its name, description, required input
(`npm-token`), and execution environment.
* Implemented `.github/actions/set-npm-token/main.js` to read the npm
token input, write it securely to the project's `.npmrc` file, and
ensure npm lifecycle scripts can run as root. The script handles missing
tokens and reports errors using GitHub Actions tooling.1 parent f4802c5 commit f989a1b
2 files changed
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
0 commit comments