From 7ba8aa8cfb6f08887d0f0c0c2a068d443bf0336a Mon Sep 17 00:00:00 2001 From: Integer Limit <103940576+IntegerLimit@users.noreply.github.com> Date: Wed, 10 Apr 2024 09:44:22 +1000 Subject: [PATCH] Update GitHub Actions to NodeJS 20 Versions, Improve Performance (#719) [SKIP] --- .github/workflows/buildpack.yml | 45 ++++++++++++++----------- .github/workflows/createchangelog.yml | 12 ++++--- .github/workflows/deploycf.yml | 8 ++--- .github/workflows/deploygh.yml | 11 +++--- .github/workflows/forkprbuildpack.yml | 28 ++++++++------- .github/workflows/releasecommit.yml | 9 ++--- .github/workflows/updateEnglishLang.yml | 3 +- 7 files changed, 65 insertions(+), 51 deletions(-) diff --git a/.github/workflows/buildpack.yml b/.github/workflows/buildpack.yml index 81a284d..06236be 100644 --- a/.github/workflows/buildpack.yml +++ b/.github/workflows/buildpack.yml @@ -96,7 +96,7 @@ jobs: ref: ${{ inputs.tag }} - name: Restore Cached Files - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache with: path: | @@ -107,9 +107,9 @@ jobs: restore-keys: ${{ runner.os }}-bunny- - name: Setup NodeJS v16 - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: "16" + node-version: 20 check-latest: true - name: Setup NPM Packages @@ -136,13 +136,14 @@ jobs: COMPARE_TAG: ${{ inputs.compare_tag }} - name: Upload All Files - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Built Pack path: | ./build/*.zip ./build/*.md if-no-files-found: error + compression-level: 0 makeNames: name: Make Artifact Names (${{ inputs.tag }}) @@ -166,7 +167,7 @@ jobs: ref: ${{ inputs.tag }} - name: Restore Cached Files - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache with: path: | @@ -177,9 +178,9 @@ jobs: restore-keys: ${{ runner.os }}-bunny- - name: Setup NodeJS v16 - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: "16" + node-version: 20 check-latest: true - name: Setup NPM Packages @@ -218,7 +219,7 @@ jobs: ref: ${{ inputs.tag }} - name: Restore Cached Files - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache with: path: | @@ -229,9 +230,9 @@ jobs: restore-keys: ${{ runner.os }}-bunny- - name: Setup NodeJS v16 - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: "16" + node-version: 20 check-latest: true - name: Setup NPM Packages @@ -258,11 +259,12 @@ jobs: COMPARE_TAG: ${{ inputs.compare_tag }} - name: Upload Client Zip - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ needs.makeNames.outputs.client }} path: ./build/client/**/* if-no-files-found: error + compression-level: 9 buildServer: name: Build Pack Server (${{ inputs.tag }}) @@ -282,7 +284,7 @@ jobs: ref: ${{ inputs.tag }} - name: Restore Cached Files - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache with: path: | @@ -293,9 +295,9 @@ jobs: restore-keys: ${{ runner.os }}-bunny- - name: Setup NodeJS v16 - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: "16" + node-version: 20 check-latest: true - name: Setup NPM Packages @@ -322,11 +324,12 @@ jobs: COMPARE_TAG: ${{ inputs.compare_tag }} - name: Upload Server Zip - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ needs.makeNames.outputs.server }} path: ./build/server/**/* if-no-files-found: error + compression-level: 9 buildLang: name: Build Pack Lang and Changelogs (${{ inputs.tag }}) @@ -346,7 +349,7 @@ jobs: ref: ${{ inputs.tag }} - name: Restore Cached Files - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache with: path: | @@ -357,9 +360,9 @@ jobs: restore-keys: ${{ runner.os }}-bunny- - name: Setup NodeJS v16 - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: "16" + node-version: 20 check-latest: true - name: Setup NPM Packages @@ -386,15 +389,17 @@ jobs: COMPARE_TAG: ${{ inputs.compare_tag }} - name: Upload Lang Zip - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ needs.makeNames.outputs.lang }} path: ./build/lang/**/* if-no-files-found: error + compression-level: 9 - name: Upload Changelogs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Changelogs path: ./build/*.md if-no-files-found: error + compression-level: 9 diff --git a/.github/workflows/createchangelog.yml b/.github/workflows/createchangelog.yml index a130761..2ee0835 100644 --- a/.github/workflows/createchangelog.yml +++ b/.github/workflows/createchangelog.yml @@ -62,11 +62,12 @@ jobs: steps: - name: Get Token id: token - uses: peter-murray/workflow-application-token-action@v2.1.0 + uses: peter-murray/workflow-application-token-action@v3 with: application_id: ${{ secrets.APP_ID }} application_private_key: ${{ secrets.APP_KEY }} organization: Nomi-CEu + revoke_token: true - name: Checkout Repo uses: actions/checkout@v4 @@ -76,7 +77,7 @@ jobs: token: ${{ steps.token.outputs.token }} - name: Restore Cached Files - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache with: path: | @@ -87,9 +88,9 @@ jobs: restore-keys: ${{ runner.os }}-bunny- - name: Setup NodeJS v16 - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: "16" + node-version: 20 check-latest: true - name: Setup NPM Packages @@ -118,11 +119,12 @@ jobs: create_branch: true - name: Upload Changelog - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Changelogs path: | ./CHANGELOG.md ./CHANGELOG_CF.md if-no-files-found: error + compression-level: 9 diff --git a/.github/workflows/deploycf.yml b/.github/workflows/deploycf.yml index 08814a5..0f114b7 100644 --- a/.github/workflows/deploycf.yml +++ b/.github/workflows/deploycf.yml @@ -26,7 +26,7 @@ jobs: ref: ${{ inputs.tag }} - name: Restore Cached Files - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache with: path: | @@ -37,9 +37,9 @@ jobs: restore-keys: ${{ runner.os }}-bunny- - name: Setup NodeJS v16 - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: "16" + node-version: 20 check-latest: true - name: Setup NPM Packages @@ -56,7 +56,7 @@ jobs: CFCORE_API_TOKEN: ${{ secrets.CFCORE_API_TOKEN }} - name: Download Built Artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: Built Pack path: ./build/ diff --git a/.github/workflows/deploygh.yml b/.github/workflows/deploygh.yml index f129ed3..559b19d 100644 --- a/.github/workflows/deploygh.yml +++ b/.github/workflows/deploygh.yml @@ -21,11 +21,12 @@ jobs: steps: - name: Get Token id: token - uses: peter-murray/workflow-application-token-action@v2.1.0 + uses: peter-murray/workflow-application-token-action@v3 with: application_id: ${{ secrets.APP_ID }} application_private_key: ${{ secrets.APP_KEY }} organization: Nomi-CEu + revoke_token: true - name: Checkout Tag uses: actions/checkout@v4 @@ -34,7 +35,7 @@ jobs: ref: ${{ inputs.tag }} - name: Restore Cached Files - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache with: path: | @@ -45,9 +46,9 @@ jobs: restore-keys: ${{ runner.os }}-bunny- - name: Setup NodeJS v16 - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: "16" + node-version: 20 check-latest: true - name: Setup NPM Packages @@ -64,7 +65,7 @@ jobs: CFCORE_API_TOKEN: ${{ secrets.CFCORE_API_TOKEN }} - name: Download Built Artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: Built Pack path: ./build/ diff --git a/.github/workflows/forkprbuildpack.yml b/.github/workflows/forkprbuildpack.yml index 2ab3545..676960d 100644 --- a/.github/workflows/forkprbuildpack.yml +++ b/.github/workflows/forkprbuildpack.yml @@ -48,9 +48,9 @@ jobs: # Don't use cache to prevent cache poisoning - name: Setup NodeJS v16 - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: "16" + node-version: 20 check-latest: true - name: Setup NPM Packages @@ -82,9 +82,9 @@ jobs: # Don't use cache to prevent cache poisoning - name: Setup NodeJS v16 - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: "16" + node-version: 20 check-latest: true - name: Setup NPM Packages @@ -98,11 +98,12 @@ jobs: CFCORE_API_TOKEN: ${{ secrets.CFCORE_API_TOKEN }} - name: Upload Client Zip - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ needs.setup.outputs.client }} path: ./build/client/**/* if-no-files-found: error + compression-level: 9 buildServer: # Only continue if we are in base Nomi-CEu Repo and pull request is from fork @@ -124,9 +125,9 @@ jobs: # Don't use cache to prevent cache poisoning - name: Setup NodeJS v16 - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: "16" + node-version: 20 check-latest: true - name: Setup NPM Packages @@ -140,11 +141,12 @@ jobs: CFCORE_API_TOKEN: ${{ secrets.CFCORE_API_TOKEN }} - name: Upload Server Zip - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ needs.setup.outputs.server }} path: ./build/server/**/* if-no-files-found: error + compression-level: 9 buildLang: # Only continue if we are in base Nomi-CEu Repo and pull request is from fork @@ -166,9 +168,9 @@ jobs: # Don't use cache to prevent cache poisoning - name: Setup NodeJS v16 - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: "16" + node-version: 20 check-latest: true - name: Setup NPM Packages @@ -182,15 +184,17 @@ jobs: CFCORE_API_TOKEN: ${{ secrets.CFCORE_API_TOKEN }} - name: Upload Lang Zip - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ needs.setup.outputs.lang }} path: ./build/lang/**/* if-no-files-found: error + compression-level: 9 - name: Upload Changelogs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Changelogs path: ./build/*.md if-no-files-found: error + compression-level: 9 diff --git a/.github/workflows/releasecommit.yml b/.github/workflows/releasecommit.yml index cfde6f9..e5305f3 100644 --- a/.github/workflows/releasecommit.yml +++ b/.github/workflows/releasecommit.yml @@ -58,11 +58,12 @@ jobs: steps: - name: Get Token id: token - uses: peter-murray/workflow-application-token-action@v2.1.0 + uses: peter-murray/workflow-application-token-action@v3 with: application_id: ${{ secrets.APP_ID }} application_private_key: ${{ secrets.APP_KEY }} organization: Nomi-CEu + revoke_token: true - name: Checkout Repo uses: actions/checkout@v4 @@ -71,7 +72,7 @@ jobs: token: ${{ steps.token.outputs.token }} - name: Restore Cached Files - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache with: path: | @@ -82,9 +83,9 @@ jobs: restore-keys: ${{ runner.os }}-bunny- - name: Setup NodeJS v16 - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: "16" + node-version: 20 check-latest: true - name: Setup NPM Packages diff --git a/.github/workflows/updateEnglishLang.yml b/.github/workflows/updateEnglishLang.yml index 1832cba..7afe7a8 100644 --- a/.github/workflows/updateEnglishLang.yml +++ b/.github/workflows/updateEnglishLang.yml @@ -28,7 +28,7 @@ jobs: # Nomi-CEu-Management has access to all of Nomi-CEu's Repos. - name: Get Token id: token - uses: peter-murray/workflow-application-token-action@v2.1.0 + uses: peter-murray/workflow-application-token-action@v3 with: # Shared Org Secret: Contains the Nomi-CEu-Management App ID (773030) application_id: ${{ secrets.APP_ID }} @@ -37,6 +37,7 @@ jobs: # Paste the output of the command into the secret value. application_private_key: ${{ secrets.APP_KEY }} organization: Nomi-CEu + revoke_token: true - name: Dispatch Workflow uses: actions/github-script@v5