From 48263767f0d9db228d7c61671384ff68d289c308 Mon Sep 17 00:00:00 2001 From: Melinda Sava <52279764+mellyynda@users.noreply.github.com> Date: Wed, 12 Feb 2025 14:59:40 +0100 Subject: [PATCH 1/3] Add deprecate workflow --- .github/workflows/deprecate_old.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/deprecate_old.yaml diff --git a/.github/workflows/deprecate_old.yaml b/.github/workflows/deprecate_old.yaml new file mode 100644 index 0000000..8ef3a31 --- /dev/null +++ b/.github/workflows/deprecate_old.yaml @@ -0,0 +1,24 @@ +# DO: npm deprecate hosted-fields-sdk@"<1.2.5" "CRITICAL Please update your configuration for production environments ONLY: change the hostedfieldsurl value from https://hostedpages.paymentiq.io/1.0.38/index.html to https://card-fields.paymentiq.io/1.0.50/index.html as specified in the README. Versions of hosted-fields-sdk prior to 1.2.5 are deprecated." --otp=376853 --dry-run +name: Deprecate packages on npm + +on: + workflow_dispatch: +jobs: + deprecate: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20.12.2' + registry-url: 'https://registry.npmjs.org' + token: ${{ secrets.NPM_TOKEN }} + + - name: Deprecate on npm + run: npm deprecate hosted-fields-sdk@"< 1.2.5" "CRITICAL Please update your configuration for production environments ONLY. Change the hostedfieldsurl value from https://hostedpages.paymentiq.io/1.0.38/index.html to https://card-fields.paymentiq.io/1.0.50/index.html as specified in the README. Versions of hosted-fields-sdk prior to 1.2.5 are deprecated." --dry-run + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From 3f74f6439a17e8403742db59729c030197ea39b9 Mon Sep 17 00:00:00 2001 From: Melinda Sava <52279764+mellyynda@users.noreply.github.com> Date: Wed, 12 Feb 2025 15:08:23 +0100 Subject: [PATCH 2/3] Run on PR edited --- .github/workflows/deprecate_old.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deprecate_old.yaml b/.github/workflows/deprecate_old.yaml index 8ef3a31..8cbb6a1 100644 --- a/.github/workflows/deprecate_old.yaml +++ b/.github/workflows/deprecate_old.yaml @@ -1,12 +1,11 @@ -# DO: npm deprecate hosted-fields-sdk@"<1.2.5" "CRITICAL Please update your configuration for production environments ONLY: change the hostedfieldsurl value from https://hostedpages.paymentiq.io/1.0.38/index.html to https://card-fields.paymentiq.io/1.0.50/index.html as specified in the README. Versions of hosted-fields-sdk prior to 1.2.5 are deprecated." --otp=376853 --dry-run name: Deprecate packages on npm - on: + pull_request: + types: [opened, synchronize, reopened, edited] workflow_dispatch: jobs: deprecate: runs-on: ubuntu-latest - steps: - name: Checkout code uses: actions/checkout@v3 From c229a52f1bd0d4d44bad4cad7f9cbbd60a643ab7 Mon Sep 17 00:00:00 2001 From: Melinda Sava <52279764+mellyynda@users.noreply.github.com> Date: Wed, 12 Feb 2025 15:15:44 +0100 Subject: [PATCH 3/3] Remove command before closing PR. --- .github/workflows/deprecate_old.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/deprecate_old.yaml b/.github/workflows/deprecate_old.yaml index 8cbb6a1..f84748b 100644 --- a/.github/workflows/deprecate_old.yaml +++ b/.github/workflows/deprecate_old.yaml @@ -1,7 +1,5 @@ name: Deprecate packages on npm on: - pull_request: - types: [opened, synchronize, reopened, edited] workflow_dispatch: jobs: deprecate: @@ -16,8 +14,3 @@ jobs: node-version: '20.12.2' registry-url: 'https://registry.npmjs.org' token: ${{ secrets.NPM_TOKEN }} - - - name: Deprecate on npm - run: npm deprecate hosted-fields-sdk@"< 1.2.5" "CRITICAL Please update your configuration for production environments ONLY. Change the hostedfieldsurl value from https://hostedpages.paymentiq.io/1.0.38/index.html to https://card-fields.paymentiq.io/1.0.50/index.html as specified in the README. Versions of hosted-fields-sdk prior to 1.2.5 are deprecated." --dry-run - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}