mikeal / merge-release

Automatically release all merges to master on npm.
Other
471 stars 64 forks source link

Allow custom npmrc file #21

Closed elliot-nelson closed 4 years ago

elliot-nelson commented 4 years ago

SUMMARY

Allow caller of the action to pass in a custom .npmrc file.

DETAILS

By passing in a new NPM_CUSTOM_NPMRC variable, the user can use a fully-formed .npmrc file (likely imported from ${{secrets}}) to publish with, instead of crafting it using the various registry/auth token/etc. fields.

The use case here is interacting with a registry like private Artifactory (jfrog), which is somewhat non-standard and requires additional fields in the npmrc file to function properly. This change allows a private package being published to jfrog to use the action by passing in a secret npmrc file, while still taking advantage of the rest of the logic (bump version, tag, publish, etc.).