Skip to content

Latest commit

 

History

History
150 lines (109 loc) · 9.65 KB

prepare-package-release.md

File metadata and controls

150 lines (109 loc) · 9.65 KB

GitHub Reusable Workflow: Prepare Node.js Package Release

Prepare Node.js Package Release

Release License Stars PRs Welcome GitHub Verified Creator

Overview

Prepare Node.js package versions and lockfiles before building the release. Dispatches the calling workflow at the prepared tag; that run can build and publish. See the release guide.

Permissions

  • actions: write
  • contents: write
  • pull-requests: read

Inputs

Workflow Call Inputs

Input Description Required Type Default
release-config Optional partial release configuration as a YAML or JSON mapping, forwarded to ci-github-publish/actions/release/plan. false string -
See https://github.com/hoverkraft-tech/ci-github-publish/tree/main/actions/release/plan for supported settings and override behavior.
Pass the same configuration to preparation and release. Independent Lerna retains native version planning.
versioning Versioning tool, npm for one public package or lerna for fixed or independent workspaces. false string npm
working-directory Project or workspace root containing the lockfile and package manager configuration. false string .
package-directory Public npm package directory relative to working-directory. Leave as . for a root package or Lerna workspaces. false string .
force Force a new version on manual default-branch runs, including unchanged public packages. Uses a patch bump when no version increase is planned. Ignored for schedules and tag recovery. false boolean false
github-app-client-id Optional GitHub App client ID, paired with the github-app-key secret to generate a repository-scoped preparation token. false string -

Secrets

Secret Description Required
github-app-key Optional GitHub App private key, paired with the github-app-client-id input. The identity must be permitted by branch and tag rules. false

Outputs

Output Description
status no-changes, dispatched, released or ready. Only ready should start building and publication in this run.
packages JSON package list for the release workflow's packages input. Available when status is ready.

Contributing

Contributions are welcome! Please see the contributing guidelines for more details.

License

This project is licensed under the MIT License.

SPDX-License-Identifier: MIT

Copyright © 2026 hoverkraft-tech

For more details, see the license.


This documentation was automatically generated by CI Dokumentor.

Usage

name: Prepare Node.js Package Release
on:
  push:
    branches:
      - main
permissions: {}
jobs:
  prepare-package-release:
    uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/prepare-package-release.yml@02a04ad25ceaacdf3b7200e45fb7fec07fadf4fa # 2.1.0
    permissions:
      actions: write
      contents: write
      pull-requests: read
    secrets:
      # Optional GitHub App private key, paired with the github-app-client-id input. The identity must be permitted by branch and tag rules.
      github-app-key: ""
    with:
      # Optional partial release configuration as a YAML or JSON mapping, forwarded to ci-github-publish/actions/release/plan.
      # See https://github.com/hoverkraft-tech/ci-github-publish/tree/main/actions/release/plan for supported settings and override behavior.
      # Pass the same configuration to preparation and release. Independent Lerna retains native version planning.
      release-config: ""

      # Versioning tool, npm for one public package or lerna for fixed or independent workspaces.
      # Default: `npm`
      versioning: npm

      # Project or workspace root containing the lockfile and package manager configuration.
      # Default: `.`
      working-directory: .

      # Public npm package directory relative to working-directory. Leave as . for a root package or Lerna workspaces.
      # Default: `.`
      package-directory: .

      # Force a new version on manual default-branch runs, including unchanged public packages. Uses a patch bump when no version increase is planned. Ignored for schedules and tag recovery.
      force: false

      # Optional GitHub App client ID, paired with the github-app-key secret to generate a repository-scoped preparation token.
      github-app-client-id: ""