33# ![ Icon] ( data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItcGFja2FnZSIgY29sb3I9ImJsdWUiPjxsaW5lIHgxPSIxNi41IiB5MT0iOS40IiB4Mj0iNy41IiB5Mj0iNC4yMSI+PC9saW5lPjxwYXRoIGQ9Ik0yMSAxNlY4YTIgMiAwIDAgMC0xLTEuNzNsLTctNGEyIDIgMCAwIDAtMiAwbC03IDRBMiAyIDAgMCAwIDMgOHY4YTIgMiAwIDAgMCAxIDEuNzNsNyA0YTIgMiAwIDAgMCAyIDBsNy00QTIgMiAwIDAgMCAyMSAxNnoiPjwvcGF0aD48cG9seWxpbmUgcG9pbnRzPSIzLjI3IDYuOTYgMTIgMTIuMDEgMjAuNzMgNi45NiI+PC9wb2x5bGluZT48bGluZSB4MT0iMTIiIHkxPSIyMi4wOCIgeDI9IjEyIiB5Mj0iMTIiPjwvbGluZT48L3N2Zz4= ) GitHub Action: Package
44
55<div align =" center " >
6- <img src =" https://opengraph.githubassets.com/0b6ae3eedb6db1767aa580568b2b8537a53dce2d0080866a902253850c40f7bd /hoverkraft-tech/ci-github-nodejs " width =" 60px " align =" center " alt =" Package " />
6+ <img src =" https://opengraph.githubassets.com/4f96f3249d1151f63aed208674e7891f457414a36b8c7799ccaa893c5a4beca3 /hoverkraft-tech/ci-github-nodejs " width =" 60px " align =" center " alt =" Package " />
77</div >
88
99---
1010
1111<!-- header:end -->
12-
13- ## Overview
14-
15- Action to create and upload an npm package tarball from a Node.js project.
16-
17- ## Usage
18-
19- ``` yaml
20- - uses : hoverkraft-tech/ci-github-nodejs/actions/package@c9d9d041ba4ef35695ee469c4782fa6a8bbebbcc # 0.21.2
21- with :
22- # Working directory where the package is packed.
23- # Can be absolute or relative to the repository root.
24- #
25- # Default: `.`
26- working-directory : .
27-
28- # Optional build artifact ID to download before packaging.
29- build-artifact-id : " "
30-
31- # Optional version to apply with `npm version` before packaging.
32- # The version is applied without creating a git tag.
33- version : " "
34-
35- # Name of the uploaded package tarball artifact
36- # Default: `package-tarball`
37- artifact-name : package-tarball
38- ` ` `
39-
40- ## Inputs
41-
42- | **Input** | **Description** | **Required** | **Default** |
43- | ----------------------- | ---------------------------------------------------------------- | ------------ | ----------------- |
44- | **` working-directory`** | Working directory where the package is packed. | **false** | `.` |
45- | | Can be absolute or relative to the repository root. | | |
46- | **`build-artifact-id`** | Optional build artifact ID to download before packaging. | **false** | - |
47- | | When provided, the artifact will be downloaded to the workspace. | | |
48- | **`version`** | Optional version to apply with `npm version` before packaging. | **false** | - |
49- | | The version is applied without creating a Git tag. | | |
50- | **`artifact-name`** | Name of the uploaded package tarball artifact | **false** | `package-tarball` |
51-
52- # # Outputs
53-
54- | **Output** | **Description** |
55- | --------------------------------- | ---------------------------------------------- |
56- | **`package-tarball-path`** | Absolute path to the generated package tarball |
57- | **`package-tarball-artifact-id`** | Artifact ID of the uploaded package tarball |
58-
59- # # Contributing
60-
61- Contributions are welcome! Please see the [contributing guidelines](https://github.com/hoverkraft-tech/ci-github-nodejs/blob/main/CONTRIBUTING.md) for more details.
6212<!-- badges:start -->
6313
6414[ ![ Marketplace] ( https://img.shields.io/badge/Marketplace-package-blue?logo=github-actions )] ( https://github.com/marketplace/actions/package )
@@ -80,14 +30,19 @@ Action to create and upload an npm package tarball from a Node.js project
8030## Usage
8131
8232``` yaml
83- - uses: hoverkraft-tech/ci-github-nodejs/actions/package@775ce0902c528062cc94141dd7d13261083b752a # 0.22.0
33+ - uses : hoverkraft-tech/ci-github-nodejs/actions/package@f81c0d625c99d16be16427d82737651df1af5ee9 # main
8434 with :
85- # Working directory where the package is packed .
35+ # Working directory where dependencies are installed for packaging .
8636 # Can be absolute or relative to the repository root.
8737 #
8838 # Default: `.`
8939 working-directory : .
9040
41+ # Optional package directory to version and pack.
42+ # Can be absolute or relative to `working-directory`.
43+ # Useful for monorepos where dependencies are installed at the root.
44+ package-directory : " "
45+
9146 # Optional build artifact ID to download before packaging.
9247 # When provided, the artifact will be downloaded to the workspace.
9348 build-artifact-id : " "
@@ -112,17 +67,20 @@ Action to create and upload an npm package tarball from a Node.js project
11267
11368## Inputs
11469
115- | **Input** | **Description** | **Required** | **Default** |
116- | ------------------------- | ------------------------------------------------------------------------------------------- | ------------ | ------------------------- |
117- | **` working-directory`** | Working directory where the package is packed. | **false** | `.` |
118- | | Can be absolute or relative to the repository root. | | |
119- | **`build-artifact-id`** | Optional build artifact ID to download before packaging. | **false** | - |
120- | | When provided, the artifact will be downloaded to the workspace. | | |
121- | **`build-artifact-path`** | Optional path to the build artifact contents relative to the workspace root. | **false** | `${{ github.workspace }}` |
122- | | Used to locate the files to be included in the package when a build artifact is downloaded. | | |
123- | **`version`** | Optional version to apply with `npm version` before packaging. | **false** | - |
124- | | The version is applied without creating a Git tag. | | |
125- | **`artifact-name`** | Name of the uploaded package tarball artifact | **false** | `package-tarball` |
70+ | **Input** | **Description** | **Required** | **Default** |
71+ | ------------------------- | ------------------------------------------------------------------------------------------- | ------------ | --------------------------- |
72+ | **` working-directory`** | Working directory where dependencies are installed for packaging. | **false** | `.` |
73+ | | Can be absolute or relative to the repository root. | | |
74+ | **`package-directory`** | Optional package directory to version and pack. | **false** | - |
75+ | | Can be absolute or relative to `working-directory`. | | |
76+ | | Useful for monorepos where dependencies are installed at the root. | | |
77+ | **`build-artifact-id`** | Optional build artifact ID to download before packaging. | **false** | - |
78+ | | When provided, the artifact will be downloaded to the workspace. | | |
79+ | **`build-artifact-path`** | Optional path to the build artifact contents relative to the workspace root. | **false** | `$\{\{ github.workspace }}` |
80+ | | Used to locate the files to be included in the package when a build artifact is downloaded. | | |
81+ | **`version`** | Optional version to apply with `npm version` before packaging. | **false** | - |
82+ | | The version is applied without creating a Git tag. | | |
83+ | **`artifact-name`** | Name of the uploaded package tarball artifact | **false** | `package-tarball` |
12684
12785<!-- inputs:end -->
12886<!-- secrets:start -->
0 commit comments