From a20dbd8e3f281fa3e789a8078b609739f85749fe Mon Sep 17 00:00:00 2001 From: "hoverkraft-bot[bot]" <128996893+hoverkraft-bot[bot]@users.noreply.github.com> Date: Thu, 14 May 2026 07:50:35 +0000 Subject: [PATCH] docs: update actions and workflows documentation [skip ci] Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/workflows/release.md | 113 ++++++++++++++++++++++------------- actions/package/README.md | 39 ++++++------ 2 files changed, 92 insertions(+), 60 deletions(-) diff --git a/.github/workflows/release.md b/.github/workflows/release.md index 5691bb5..3244eda 100644 --- a/.github/workflows/release.md +++ b/.github/workflows/release.md @@ -3,7 +3,7 @@ # GitHub Reusable Workflow: Node.js Release
- Node.js Release + Node.js Release
--- @@ -23,17 +23,12 @@ ## Overview -Workflow to publish the exact Node.js package tarball produced and verified by -CI. - -The workflow downloads a raw `.tgz` artifact by immutable artifact ID, verifies -that exactly one tarball is present, configures Node.js for the target registry, -and runs `npm publish` against that tarball. +Workflow to release Node.js packages from a package tarball produced by CI. ### Permissions - **`contents`**: `read` -- **`id-token`**: `write` (required for provenance) +- **`id-token`**: `write` - **`packages`**: `write` @@ -42,37 +37,60 @@ and runs `npm publish` against that tarball. ## Usage -### Publish a CI Package Tarball - ```yaml -name: Release - +name: Node.js Release on: push: - tags: ["*"] - + branches: + - main permissions: {} - jobs: - ci: - uses: ./.github/workflows/__shared-ci.yml - permissions: - contents: read - id-token: write - packages: read - secrets: inherit - release: - needs: ci - uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/release.yml@main - permissions: - contents: read - packages: write - id-token: write + uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/release.yml@47891dc49a31209a88949e081d97a010f8cd20c4 # 0.23.2 + permissions: {} secrets: - registry-token: ${{ secrets.NPM_TOKEN }} + # GitHub token to use for authentication. + # Defaults to `GITHUB_TOKEN` if not provided. + github-token: "" + + # Authentication token for the package registry. + registry-token: "" with: - package-tarball-artifact-id: ${{ needs.ci.outputs.package-tarball-artifact-id }} + # JSON array of runner(s) to use. + # See https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job. + # + # Default: `["ubuntu-latest"]` + runs-on: '["ubuntu-latest"]' + + # Artifact ID of the package tarball produced by CI. + # This input is required. + package-tarball-artifact-id: "" + + # Registry URL used by npm publish. + # Default: `https://registry.npmjs.org` + registry-url: https://registry.npmjs.org + + # Package access level passed to npm publish. Leave empty to use npm defaults. + # Default: `public` + access: public + + # npm distribution tag for the published package. + # Common values: + # - `latest` — Default tag for stable releases + # - `next` — Pre-release or beta versions + # - `canary` — Canary/nightly builds + # + # See https://docs.npmjs.com/adding-dist-tags-to-packages. + # + # Default: `latest` + tag: latest + + # Whether to generate npm provenance for npmjs.org publishes. + # Default: `true` + provenance: true + + # Whether to run npm publish without publishing the package. + dry-run: false ``` @@ -91,10 +109,14 @@ jobs: | | See . | | | | | **`package-tarball-artifact-id`** | Artifact ID of the package tarball produced by CI. | **true** | **string** | - | | **`registry-url`** | Registry URL used by npm publish. | **false** | **string** | `https://registry.npmjs.org` | -| **`access`** | Package access level passed to npm publish. | **false** | **string** | `public` | -| | Leave empty to use npm defaults. | | | | +| **`access`** | Package access level passed to npm publish. Leave empty to use npm defaults. | **false** | **string** | `public` | | **`tag`** | npm distribution tag for the published package. | **false** | **string** | `latest` | -| | Common values: `latest`, `next`, `canary`. | | | | +| | Common values: | | | | +| | - `latest` — Default tag for stable releases | | | | +| | - `next` — Pre-release or beta versions | | | | +| | - `canary` — Canary/nightly builds | | | | +| | | | | | +| | See . | | | | | **`provenance`** | Whether to generate npm provenance for npmjs.org publishes. | **false** | **boolean** | `true` | | **`dry-run`** | Whether to run npm publish without publishing the package. | **false** | **boolean** | `false` | @@ -106,9 +128,11 @@ jobs: ## Secrets -| **Secret** | **Description** | **Required** | -| -------------------- | --------------------------------------------------------- | ------------ | -| **`registry-token`** | Authentication token for token-based registry publishing. | **false** | +| **Secret** | **Description** | **Required** | +| -------------------- | ---------------------------------------------- | ------------ | +| **`github-token`** | GitHub token to use for authentication. | **false** | +| | Defaults to `GITHUB_TOKEN` if not provided. | | +| **`registry-token`** | Authentication token for the package registry. | **false** | @@ -138,7 +162,7 @@ jobs: release: needs: ci - uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/release.yml@main + uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/release.yml@47891dc49a31209a88949e081d97a010f8cd20c4 # 0.23.2 permissions: contents: read packages: write @@ -166,7 +190,7 @@ permissions: {} jobs: dry-run: - uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/release.yml@main + uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/release.yml@47891dc49a31209a88949e081d97a010f8cd20c4 # 0.23.2 permissions: contents: read packages: write @@ -198,8 +222,17 @@ This project is licensed under the MIT License. SPDX-License-Identifier: MIT -Copyright © 2025 hoverkraft-tech +Copyright © 2026 hoverkraft-tech For more details, see the [license](http://choosealicense.com/licenses/mit/). + + + + +--- + +This documentation was automatically generated by [CI Dokumentor](https://github.com/hoverkraft-tech/ci-dokumentor). + + diff --git a/actions/package/README.md b/actions/package/README.md index 412b59e..ef02d3f 100644 --- a/actions/package/README.md +++ b/actions/package/README.md @@ -3,7 +3,7 @@ # ![Icon](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItcGFja2FnZSIgY29sb3I9ImJsdWUiPjxsaW5lIHgxPSIxNi41IiB5MT0iOS40IiB4Mj0iNy41IiB5Mj0iNC4yMSI+PC9saW5lPjxwYXRoIGQ9Ik0yMSAxNlY4YTIgMiAwIDAgMC0xLTEuNzNsLTctNGEyIDIgMCAwIDAtMiAwbC03IDRBMiAyIDAgMCAwIDMgOHY4YTIgMiAwIDAgMCAxIDEuNzNsNyA0YTIgMiAwIDAgMCAyIDBsNy00QTIgMiAwIDAgMCAyMSAxNnoiPjwvcGF0aD48cG9seWxpbmUgcG9pbnRzPSIzLjI3IDYuOTYgMTIgMTIuMDEgMjAuNzMgNi45NiI+PC9wb2x5bGluZT48bGluZSB4MT0iMTIiIHkxPSIyMi4wOCIgeDI9IjEyIiB5Mj0iMTIiPjwvbGluZT48L3N2Zz4=) GitHub Action: Package
- Package + Package
--- @@ -30,7 +30,7 @@ Action to create and upload an npm package tarball from a Node.js project ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/package@9d465a03741b287db18b242e0ec46990888cc6a3 # 0.23.0 +- uses: hoverkraft-tech/ci-github-nodejs/actions/package@47891dc49a31209a88949e081d97a010f8cd20c4 # 0.23.2 with: # Working directory where dependencies are installed for packaging. # Can be absolute or relative to the repository root. @@ -57,9 +57,8 @@ Action to create and upload an npm package tarball from a Node.js project # The version is applied without creating a Git tag. version: "" - # Optional name of the uploaded package tarball artifact. - # When omitted, a unique `package-tarball-*` name is generated. - artifact-name: package-tarball + # Name of the uploaded package tarball artifact + artifact-name: "" ``` @@ -67,20 +66,20 @@ Action to create and upload an npm package tarball from a Node.js project ## Inputs -| **Input** | **Description** | **Required** | **Default** | -| ------------------------- | ------------------------------------------------------------------------------------------- | ------------ | -------------------------- | -| **`working-directory`** | Working directory where dependencies are installed for packaging. | **false** | `.` | -| | Can be absolute or relative to the repository root. | | | -| **`package-directory`** | Optional package directory to version and pack. | **false** | - | -| | Can be absolute or relative to `working-directory`. | | | -| | Useful for monorepos where dependencies are installed at the root. | | | -| **`build-artifact-id`** | Optional build artifact ID to download before packaging. | **false** | - | -| | When provided, the artifact will be downloaded to the workspace. | | | -| **`build-artifact-path`** | Optional path to the build artifact contents relative to the workspace root. | **false** | `${{ github.workspace }}` | -| | Used to locate the files to be included in the package when a build artifact is downloaded. | | | -| **`version`** | Optional version to apply with `npm version` before packaging. | **false** | - | -| | The version is applied without creating a Git tag. | | | -| **`artifact-name`** | Name of the uploaded package tarball artifact | **false** | Auto-generated unique name | +| **Input** | **Description** | **Required** | **Default** | +| ------------------------- | ------------------------------------------------------------------------------------------- | ------------ | ------------------------- | +| **`working-directory`** | Working directory where dependencies are installed for packaging. | **false** | `.` | +| | Can be absolute or relative to the repository root. | | | +| **`package-directory`** | Optional package directory to version and pack. | **false** | - | +| | Can be absolute or relative to `working-directory`. | | | +| | Useful for monorepos where dependencies are installed at the root. | | | +| **`build-artifact-id`** | Optional build artifact ID to download before packaging. | **false** | - | +| | When provided, the artifact will be downloaded to the workspace. | | | +| **`build-artifact-path`** | Optional path to the build artifact contents relative to the workspace root. | **false** | `${{ github.workspace }}` | +| | Used to locate the files to be included in the package when a build artifact is downloaded. | | | +| **`version`** | Optional version to apply with `npm version` before packaging. | **false** | - | +| | The version is applied without creating a Git tag. | | | +| **`artifact-name`** | Name of the uploaded package tarball artifact | **false** | - | @@ -107,7 +106,7 @@ jobs: package-tarball-artifact-id: ${{ steps.package.outputs.package-tarball-artifact-id }} steps: - id: package - uses: hoverkraft-tech/ci-github-nodejs/actions/package@9d465a03741b287db18b242e0ec46990888cc6a3 # 0.23.0 + uses: hoverkraft-tech/ci-github-nodejs/actions/package@47891dc49a31209a88949e081d97a010f8cd20c4 # 0.23.2 consume: needs: package