npm:GitHub与npm交互的动作

  • I2_466402
    了解作者
  • 17.9KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-27 04:16
    上传日期
NPM的GitHub操作 此动作可使用npm命令行客户端启用任意动作,包括测试程序包和发布到注册表。 用法 生成,测试npm程序包并将其发布到默认公共注册表的工作流程示例如下: workflow " Build, Test, and Publish " { on = " push " resolves = [ " Publish " ] } action " Build " { uses = " actions/npm@master " args = " install " } action " Test " { needs = " Build " uses = " actions/npm@master " args = " test " } action " Publish " { needs = " Test " uses = " actions/
npm-master.zip
  • npm-master
  • THIRD_PARTY_NOTICE.md
    65.4KB
  • Brewfile
    30B
  • .github
  • main.workflow
    983B
  • test
  • bin
  • npm
    26B
  • entrypoint.bats
    945B
  • Dockerfile
    549B
  • LICENSE
    1.1KB
  • .dockerignore
    133B
  • README.md
    1.7KB
  • script
  • bootstrap
    381B
  • test
    160B
  • entrypoint.sh
    434B
内容介绍
# GitHub Actions for NPM This Action for [npm](https://www.npmjs.com/) enables arbitrary actions with the `npm` command-line client, including testing packages and publishing to a registry. ## Usage An example workflow to build, test, and publish an npm package to the default public registry follows: ```hcl workflow "Build, Test, and Publish" { on = "push" resolves = ["Publish"] } action "Build" { uses = "actions/npm@master" args = "install" } action "Test" { needs = "Build" uses = "actions/npm@master" args = "test" } action "Publish" { needs = "Test" uses = "actions/npm@master" args = "publish --access public" secrets = ["NPM_AUTH_TOKEN"] } ``` ### Secrets * `NPM_AUTH_TOKEN` - **Optional**. The token to use for authentication with the npm registry. Required for `npm publish` ([more info](https://docs.npmjs.com/getting-started/working_with_tokens)) ### Environment variables * `NPM_REGISTRY_URL` - **Optional**. To specify a registry to authenticate with. Defaults to `registry.npmjs.org` * `NPM_CONFIG_USERCONFIG` - **Optional**. To specify a non-default per-user configuration file. Defaults to `$HOME/.npmrc` ([more info](https://docs.npmjs.com/misc/config#npmrc-files)) #### Example To authenticate with, and publish to, a registry other than `registry.npmjs.org`: ```hcl action "Publish" { uses = "actions/npm@master" args = "publish --access public" env = { NPM_REGISTRY_URL = "someOtherRegistry.someDomain.net" } secrets = ["NPM_TOKEN"] } ``` ## License The Dockerfile and associated scripts and documentation in this project are released under the [MIT License](LICENSE). Container images built with this project include third party materials. See [THIRD_PARTY_NOTICE.md](THIRD_PARTY_NOTICE.md) for details.
评论
    相关推荐