From b629d51e299388216660760d9b2de589af38dc9c Mon Sep 17 00:00:00 2001 From: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com> Date: Tue, 8 Aug 2023 10:46:37 +0200 Subject: [PATCH 1/3] Rename release.js.1 to release.js --- .github/scripts/{release.js.1 => release.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/scripts/{release.js.1 => release.js} (100%) diff --git a/.github/scripts/release.js.1 b/.github/scripts/release.js similarity index 100% rename from .github/scripts/release.js.1 rename to .github/scripts/release.js From 5a18bb49bfb2d2116cfe658455cc7c9366a64390 Mon Sep 17 00:00:00 2001 From: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com> Date: Tue, 8 Aug 2023 13:52:07 +0200 Subject: [PATCH 2/3] Update lib-release.yml Add condition to verify release script does not already exist --- .github/workflows/lib-release.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lib-release.yml b/.github/workflows/lib-release.yml index 5bdca9b40..9f37befd7 100644 --- a/.github/workflows/lib-release.yml +++ b/.github/workflows/lib-release.yml @@ -21,7 +21,13 @@ jobs: run: | git fetch origin develop:develop git reset --hard develop + - name: Check file existence + id: check_files + uses: andstor/file-existence-action@v2 + with: + files: ".github/scripts/release.js" - name: Get the release script + if: steps.check_files.outputs.files_exists == 'false' run: | wget https://raw.githubusercontent.com/Adyen/adyen-node-api-library/develop/.github/scripts/release.js -P ./.github/scripts - name: Grab current version @@ -66,4 +72,4 @@ jobs: with: token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }} pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} - merge-method: merge \ No newline at end of file + merge-method: merge From 24942cc74c918512c6fce00b119c70adebb7b5e5 Mon Sep 17 00:00:00 2001 From: Michael Paul Date: Tue, 8 Aug 2023 15:40:21 +0000 Subject: [PATCH 3/3] Download script only on other projects --- .github/workflows/lib-release.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/lib-release.yml b/.github/workflows/lib-release.yml index 9f37befd7..240e939fc 100644 --- a/.github/workflows/lib-release.yml +++ b/.github/workflows/lib-release.yml @@ -21,13 +21,8 @@ jobs: run: | git fetch origin develop:develop git reset --hard develop - - name: Check file existence - id: check_files - uses: andstor/file-existence-action@v2 - with: - files: ".github/scripts/release.js" - name: Get the release script - if: steps.check_files.outputs.files_exists == 'false' + if: github.repository != 'Adyen/adyen-node-api-library' run: | wget https://raw.githubusercontent.com/Adyen/adyen-node-api-library/develop/.github/scripts/release.js -P ./.github/scripts - name: Grab current version @@ -51,6 +46,7 @@ jobs: CURRENT_VERSION: ${{steps.current-version.outputs.currentVersion}} NEXT_VERSION: ${{steps.release.outputs.nextVersion}} - name: Delete the release script + if: github.repository != 'Adyen/adyen-node-api-library' run: rm -f ./.github/scripts/release.js - name: Create Pull Request id: cpr