From 3975b72f7baa53f8cb9a2a9dfabe39cf76a9c1e9 Mon Sep 17 00:00:00 2001 From: Filippos Malandrakis <35352222+filippos47@users.noreply.github.com> Date: Mon, 21 Oct 2024 09:40:44 +0300 Subject: [PATCH] reusable_node_lint_test: Support package publishing (#22) --- .github/workflows/reusable_node_lint_test.yml | 17 ++++++++++++++++- CHANGELOG.md | 4 ++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable_node_lint_test.yml b/.github/workflows/reusable_node_lint_test.yml index 68e329f..db7c00f 100644 --- a/.github/workflows/reusable_node_lint_test.yml +++ b/.github/workflows/reusable_node_lint_test.yml @@ -19,6 +19,15 @@ on: description: 'Run npm build' type: boolean default: false + publish: + description: 'Publish npm package' + type: boolean + default: false + publish-command: + description: 'Publish npm package command' + type: string + required: false + default: 'npm publish' jobs: build: @@ -46,4 +55,10 @@ jobs: - name: Build project if: ${{ inputs.run-build }} - run: npm run build \ No newline at end of file + run: npm run build + + - name: Publish package + if: ${{ inputs.publish }} + run: | + echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc + ${{ inputs.publish-command }} diff --git a/CHANGELOG.md b/CHANGELOG.md index ecb3686..d8eba51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 0.9.0 + +- reusable_node_lint_test: Support publishing a package + ## 0.8.0 - reusable_docker_pipeline: Set default values for AWS_ECR_REGISTRY_ID and DOCKERHUB_REGISTRY_ID