/action-yarn-publish

A github action that will detect package.json changes and automatically publish to the given registry

Primary LanguageTypeScriptMIT LicenseMIT

Action - Yarn Publish

Github Build Status

A Github action that will automatically publish a package to the registry if the version in the package.json is not already published. It can optionally push a tag to git, marking the commit the publish used.

See action.yml for more details.

For a working example on how to set this action up, see my @luvies/evaluator package workflow.

Environment variables

This action will need a number of environment variables depending on what is being done:

  • NODE_AUTH_TOKEN
    • Always needed
    • Used to authenticate the publish to the registry
      • Make sure 2fa is disabled for publishes to the registry
  • GITHUB_TOKEN
    • Only needed if git tagging is enabled
    • Can be given using the following
      • GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}