From 799666abde471635d17b03f26473f173ead759e6 Mon Sep 17 00:00:00 2001 From: Le-Caignec Date: Fri, 4 Apr 2025 09:20:28 +0200 Subject: [PATCH 1/2] feat: make NPM package scope optional with default value --- .github/workflows/publish-npm.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index e94e4c0..2170e32 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -3,8 +3,9 @@ on: workflow_call: inputs: scope: - description: 'NPM package scope (e.g., @iExecBlockchainComputing)' - required: true + description: 'NPM package scope (e.g., @iexec)' + required: false + default: '@iexec' type: string node-version: description: 'Node.js version to use' From 01937e0de5014ff540c5455795f5e04f52df4b32 Mon Sep 17 00:00:00 2001 From: Le-Caignec Date: Fri, 4 Apr 2025 09:26:48 +0200 Subject: [PATCH 2/2] docs: update README to reflect optional NPM package scope and default value --- publish-npm/README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/publish-npm/README.md b/publish-npm/README.md index c6214af..0f7cd25 100644 --- a/publish-npm/README.md +++ b/publish-npm/README.md @@ -13,7 +13,7 @@ This reusable GitHub Actions workflow automates the process of publishing an NPM | **Input** | **Description** | **Required** | **Default** | |-------------------|-----------------------------------------------------------------------------------------------|--------------|--------------------------------------| -| **scope** | Defines the NPM package scope (e.g., `@iExecBlockchainComputing`). | Yes | – | +| **scope** | Defines the NPM package scope (e.g., `@iexec`). | No | `@iexec` | | **node-version** | Specifies the Node.js version to use. | No | `20` | | **registry** | URL of the NPM registry. | No | `https://registry.npmjs.org` | | **access** | Package access level (public or restricted). | No | `public` | @@ -56,9 +56,7 @@ This reusable GitHub Actions workflow automates the process of publishing an NPM publish: uses: your-org/your-repo/.github/workflows/publish-npm.yml@main with: - scope: '@iExecBlockchainComputing' - node-version: '20' - registry: 'https://registry.npmjs.org' + node-version: '22' secrets: npm-token: ${{ secrets.NPM_TOKEN }} ```