From 039e04c43ad3b6c88bcb8bd997169f118ccac660 Mon Sep 17 00:00:00 2001 From: rickycodes Date: Wed, 27 Mar 2024 10:25:25 -0400 Subject: [PATCH 01/16] remove dry-run --- scripts/publish.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/publish.sh b/scripts/publish.sh index 77b8c29..31aa957 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -5,8 +5,8 @@ set -e set -o pipefail if [[ -z $YARN_NPM_AUTH_TOKEN ]]; then - echo "Notice: 'npm-token' not set. Running 'yarn pack --dry-run'." - yarn pack --dry-run + echo "Notice: 'npm-token' not set. Running 'yarn pack'." + yarn pack --out /tmp/%s-%v.tgz exit 0 fi From 5435a2e98c69c21efbe549589e3833ea396d9adc Mon Sep 17 00:00:00 2001 From: rickycodes Date: Thu, 28 Mar 2024 10:43:14 -0400 Subject: [PATCH 02/16] add reports.sh --- scripts/reports.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 scripts/reports.sh diff --git a/scripts/reports.sh b/scripts/reports.sh new file mode 100755 index 0000000..41f745c --- /dev/null +++ b/scripts/reports.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +set -x +set -e +set -o pipefail + +directory="/tmp" + +for file in "$directory"/*.tgz; do + if [ -f "$file" ]; then + echo "Processing $file" + basename=$(basename "$file") + name="${basename%-*}" + name_with_slash="${name/-//}" + echo "$name_with_slash" + pkdiff "$name_with_slash@latest" "$file" --no-exit-code --no-open --output "/tmp/$basename.html" + fi +done \ No newline at end of file From e5b5d70767d5314b34dadd6cce0cb1a41254662c Mon Sep 17 00:00:00 2001 From: rickycodes Date: Fri, 29 Mar 2024 17:32:25 -0400 Subject: [PATCH 03/16] add line breaks --- scripts/reports.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/reports.sh b/scripts/reports.sh index 41f745c..35aec01 100755 --- a/scripts/reports.sh +++ b/scripts/reports.sh @@ -13,6 +13,9 @@ for file in "$directory"/*.tgz; do name="${basename%-*}" name_with_slash="${name/-//}" echo "$name_with_slash" - pkdiff "$name_with_slash@latest" "$file" --no-exit-code --no-open --output "/tmp/$basename.html" + pkdiff "$name_with_slash@latest" "$file" \ + --no-exit-code \ + --no-open \ + --output "/tmp/$basename.html" fi done \ No newline at end of file From c0e7059ef295444806edea59b2bba678ace3b883 Mon Sep 17 00:00:00 2001 From: rickycodes Date: Fri, 29 Mar 2024 18:26:01 -0400 Subject: [PATCH 04/16] add pkdiff steps --- action.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/action.yml b/action.yml index 6662212..6f323b7 100644 --- a/action.yml +++ b/action.yml @@ -36,6 +36,20 @@ runs: env: YARN_NPM_AUTH_TOKEN: ${{ inputs.npm-token }} PUBLISH_NPM_TAG: ${{ inputs.npm-tag }} + - id: install-pkdiff + if: inputs.npm-token == '' + run: | + npm i -g pkdiff + - id: generate-reports + if: inputs.npm-token == '' + run: ${{ github.action_path }}/scripts/reports.sh + - id: upload-artifacts + if: inputs.npm-token == '' + uses: actions/upload-artifact@v4 + width: + path: + /tmp/*.tgz + /tmp/*.html - id: name-version shell: bash if: inputs.slack-webhook-url != '' From b9b77a9f7227d7841b97d3671e2910354ee925d5 Mon Sep 17 00:00:00 2001 From: rickycodes Date: Sat, 30 Mar 2024 17:17:15 -0400 Subject: [PATCH 05/16] use npx --- action.yml | 4 ---- scripts/reports.sh | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/action.yml b/action.yml index 6f323b7..4c667ae 100644 --- a/action.yml +++ b/action.yml @@ -36,10 +36,6 @@ runs: env: YARN_NPM_AUTH_TOKEN: ${{ inputs.npm-token }} PUBLISH_NPM_TAG: ${{ inputs.npm-tag }} - - id: install-pkdiff - if: inputs.npm-token == '' - run: | - npm i -g pkdiff - id: generate-reports if: inputs.npm-token == '' run: ${{ github.action_path }}/scripts/reports.sh diff --git a/scripts/reports.sh b/scripts/reports.sh index 35aec01..785a052 100755 --- a/scripts/reports.sh +++ b/scripts/reports.sh @@ -13,7 +13,7 @@ for file in "$directory"/*.tgz; do name="${basename%-*}" name_with_slash="${name/-//}" echo "$name_with_slash" - pkdiff "$name_with_slash@latest" "$file" \ + npx pkdiff "$name_with_slash@latest" "$file" \ --no-exit-code \ --no-open \ --output "/tmp/$basename.html" From f38c51c4fee25535214ebfab77b837aaed116a87 Mon Sep 17 00:00:00 2001 From: rickycodes Date: Wed, 10 Apr 2024 10:33:51 -0400 Subject: [PATCH 06/16] add shell --- action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/action.yml b/action.yml index 4c667ae..96f8199 100644 --- a/action.yml +++ b/action.yml @@ -37,9 +37,11 @@ runs: YARN_NPM_AUTH_TOKEN: ${{ inputs.npm-token }} PUBLISH_NPM_TAG: ${{ inputs.npm-tag }} - id: generate-reports + shell: bash if: inputs.npm-token == '' run: ${{ github.action_path }}/scripts/reports.sh - id: upload-artifacts + shell: bash if: inputs.npm-token == '' uses: actions/upload-artifact@v4 width: From f6a743d330139da15f344092ed3aa7e24933b263 Mon Sep 17 00:00:00 2001 From: rickycodes Date: Wed, 10 Apr 2024 10:34:26 -0400 Subject: [PATCH 07/16] fix typo --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 96f8199..2200a1a 100644 --- a/action.yml +++ b/action.yml @@ -44,7 +44,7 @@ runs: shell: bash if: inputs.npm-token == '' uses: actions/upload-artifact@v4 - width: + with: path: /tmp/*.tgz /tmp/*.html From 095b1d88036c6fac740e8fbd9f95b7ca1e312c46 Mon Sep 17 00:00:00 2001 From: rickycodes Date: Wed, 10 Apr 2024 14:55:31 -0400 Subject: [PATCH 08/16] remove bash --- action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/action.yml b/action.yml index 2200a1a..39229e4 100644 --- a/action.yml +++ b/action.yml @@ -41,7 +41,6 @@ runs: if: inputs.npm-token == '' run: ${{ github.action_path }}/scripts/reports.sh - id: upload-artifacts - shell: bash if: inputs.npm-token == '' uses: actions/upload-artifact@v4 with: From 1836bcb60de26851da3617bcf9f8a4923b9118ea Mon Sep 17 00:00:00 2001 From: rickycodes Date: Wed, 10 Apr 2024 15:00:37 -0400 Subject: [PATCH 09/16] use | --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 39229e4..bfaf703 100644 --- a/action.yml +++ b/action.yml @@ -44,7 +44,7 @@ runs: if: inputs.npm-token == '' uses: actions/upload-artifact@v4 with: - path: + path: | /tmp/*.tgz /tmp/*.html - id: name-version From 29bf33fce3ccfb6d420e43a89229e236157e80cc Mon Sep 17 00:00:00 2001 From: rickycodes Date: Fri, 12 Apr 2024 10:05:55 -0400 Subject: [PATCH 10/16] use node 16 --- action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/action.yml b/action.yml index bfaf703..6ba641c 100644 --- a/action.yml +++ b/action.yml @@ -36,6 +36,9 @@ runs: env: YARN_NPM_AUTH_TOKEN: ${{ inputs.npm-token }} PUBLISH_NPM_TAG: ${{ inputs.npm-tag }} + - uses: actions/setup-node@v4 + with: + node-version: 16 - id: generate-reports shell: bash if: inputs.npm-token == '' From e7e83fbe063dbbb263b246d6b695acaaf417601f Mon Sep 17 00:00:00 2001 From: rickycodes Date: Mon, 15 Apr 2024 10:39:34 -0400 Subject: [PATCH 11/16] remove npx --- action.yml | 5 ++--- scripts/reports.sh | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 6ba641c..40104c4 100644 --- a/action.yml +++ b/action.yml @@ -36,9 +36,8 @@ runs: env: YARN_NPM_AUTH_TOKEN: ${{ inputs.npm-token }} PUBLISH_NPM_TAG: ${{ inputs.npm-tag }} - - uses: actions/setup-node@v4 - with: - node-version: 16 + - id: install-pkdiff + run: npm i -g pkdiff - id: generate-reports shell: bash if: inputs.npm-token == '' diff --git a/scripts/reports.sh b/scripts/reports.sh index 785a052..35aec01 100755 --- a/scripts/reports.sh +++ b/scripts/reports.sh @@ -13,7 +13,7 @@ for file in "$directory"/*.tgz; do name="${basename%-*}" name_with_slash="${name/-//}" echo "$name_with_slash" - npx pkdiff "$name_with_slash@latest" "$file" \ + pkdiff "$name_with_slash@latest" "$file" \ --no-exit-code \ --no-open \ --output "/tmp/$basename.html" From 0d09c5ae26c85259fcbdc123450e8640d00613e7 Mon Sep 17 00:00:00 2001 From: rickycodes Date: Mon, 15 Apr 2024 10:43:37 -0400 Subject: [PATCH 12/16] add shell --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index 40104c4..4361f82 100644 --- a/action.yml +++ b/action.yml @@ -37,6 +37,7 @@ runs: YARN_NPM_AUTH_TOKEN: ${{ inputs.npm-token }} PUBLISH_NPM_TAG: ${{ inputs.npm-tag }} - id: install-pkdiff + shell: bash run: npm i -g pkdiff - id: generate-reports shell: bash From 72e51bf072474639fc348422bb2614af17410df2 Mon Sep 17 00:00:00 2001 From: rickycodes Date: Mon, 15 Apr 2024 12:36:26 -0400 Subject: [PATCH 13/16] add newline --- scripts/reports.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/reports.sh b/scripts/reports.sh index 35aec01..07592fc 100755 --- a/scripts/reports.sh +++ b/scripts/reports.sh @@ -18,4 +18,4 @@ for file in "$directory"/*.tgz; do --no-open \ --output "/tmp/$basename.html" fi -done \ No newline at end of file +done From b5bd99dc18114ff6dfbd232b7f734a0c23421eb7 Mon Sep 17 00:00:00 2001 From: rickycodes Date: Thu, 18 Apr 2024 11:34:31 -0400 Subject: [PATCH 14/16] use variable --- scripts/reports.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/reports.sh b/scripts/reports.sh index 07592fc..be2e144 100755 --- a/scripts/reports.sh +++ b/scripts/reports.sh @@ -16,6 +16,6 @@ for file in "$directory"/*.tgz; do pkdiff "$name_with_slash@latest" "$file" \ --no-exit-code \ --no-open \ - --output "/tmp/$basename.html" + --output "$directory/$basename.html" fi done From 865df49cc79f55e677074d38bf9436c10aa1498c Mon Sep 17 00:00:00 2001 From: rickycodes Date: Thu, 18 Apr 2024 11:37:29 -0400 Subject: [PATCH 15/16] report (singular) --- action.yml | 4 ++-- scripts/{reports.sh => report.sh} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename scripts/{reports.sh => report.sh} (100%) diff --git a/action.yml b/action.yml index 4361f82..8362187 100644 --- a/action.yml +++ b/action.yml @@ -39,10 +39,10 @@ runs: - id: install-pkdiff shell: bash run: npm i -g pkdiff - - id: generate-reports + - id: generate-report shell: bash if: inputs.npm-token == '' - run: ${{ github.action_path }}/scripts/reports.sh + run: ${{ github.action_path }}/scripts/report.sh - id: upload-artifacts if: inputs.npm-token == '' uses: actions/upload-artifact@v4 diff --git a/scripts/reports.sh b/scripts/report.sh similarity index 100% rename from scripts/reports.sh rename to scripts/report.sh From fb2a9534886a636529c95e64486752dfdede507e Mon Sep 17 00:00:00 2001 From: rickycodes Date: Thu, 18 Apr 2024 11:38:43 -0400 Subject: [PATCH 16/16] upload-artifact (singular) --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 8362187..56f091b 100644 --- a/action.yml +++ b/action.yml @@ -43,7 +43,7 @@ runs: shell: bash if: inputs.npm-token == '' run: ${{ github.action_path }}/scripts/report.sh - - id: upload-artifacts + - id: upload-artifact if: inputs.npm-token == '' uses: actions/upload-artifact@v4 with: