From 26cba0a39de91578800b9b85c63860a83afdf077 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 23 Feb 2024 20:10:12 -0600 Subject: [PATCH 1/2] Update all CI action usages --- .github/workflows/publish.yml | 4 +-- .github/workflows/size.yml | 2 +- .github/workflows/test-codegen.yml | 8 +++--- .github/workflows/tests.yml | 42 ++++++++++++++++-------------- 4 files changed, 29 insertions(+), 27 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d9c56a080e..3cc77b81a1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,8 +21,8 @@ jobs: id-token: write contents: read steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: '20.x' registry-url: 'https://registry.npmjs.org' diff --git a/.github/workflows/size.yml b/.github/workflows/size.yml index 83225acb63..c472268371 100644 --- a/.github/workflows/size.yml +++ b/.github/workflows/size.yml @@ -11,7 +11,7 @@ jobs: env: CI_JOB_NUMBER: 1 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: EskiMojo14/size-limit-action@v2 with: directory: packages/toolkit diff --git a/.github/workflows/test-codegen.yml b/.github/workflows/test-codegen.yml index 7745114a22..defc741c87 100644 --- a/.github/workflows/test-codegen.yml +++ b/.github/workflows/test-codegen.yml @@ -15,8 +15,8 @@ jobs: outputs: codegen: ${{ steps.filter.outputs.codegen }} steps: - - uses: actions/checkout@v2 - - uses: dorny/paths-filter@v2 + - uses: actions/checkout@v4 + - uses: dorny/paths-filter@v3 id: filter with: filters: | @@ -34,9 +34,9 @@ jobs: node-version: ['20.x'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} cache: 'yarn' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f9bf825164..e5b1cc426b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,8 +11,8 @@ jobs: outputs: toolkit: ${{ steps.filter.outputs.toolkit }} steps: - - uses: actions/checkout@v2 - - uses: dorny/paths-filter@v2 + - uses: actions/checkout@v4 + - uses: dorny/paths-filter@v3 id: filter with: filters: | @@ -34,10 +34,10 @@ jobs: steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Use node ${{ matrix.node }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} cache: 'yarn' @@ -55,7 +55,7 @@ jobs: - name: Pack run: yarn pack - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: package path: packages/toolkit/package.tgz @@ -70,10 +70,10 @@ jobs: node: ['20.x'] steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Use node ${{ matrix.node }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} cache: 'yarn' @@ -81,7 +81,7 @@ jobs: - name: Install deps run: yarn install - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: package path: packages/toolkit @@ -108,10 +108,10 @@ jobs: ts: ['4.7', '4.8', '4.9', '5.0', '5.1', '5.2', '5.3'] steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Use node ${{ matrix.node }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} cache: 'yarn' @@ -122,7 +122,7 @@ jobs: - name: Install TypeScript ${{ matrix.ts }} run: yarn add typescript@${{ matrix.ts }} - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: package path: packages/toolkit @@ -164,13 +164,13 @@ jobs: run: working-directory: ./examples/publish-ci/${{ matrix.example }} env: - YARN_ENABLE_IMMUTABLE_INSTALLS: "false" + YARN_ENABLE_IMMUTABLE_INSTALLS: false steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Use node ${{ matrix.node }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} cache: 'yarn' @@ -181,7 +181,7 @@ jobs: - name: Remove existing RTK run: yarn remove @reduxjs/toolkit - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: package path: ./examples/publish-ci/${{ matrix.example }} @@ -197,13 +197,15 @@ jobs: - name: Set up JDK 17 for React Native build if: matrix.example == 'react-native' || matrix.example == 'expo' - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: java-version: '17.x' distribution: 'temurin' - name: Build example - run: NODE_OPTIONS=--openssl-legacy-provider yarn build + env: + NODE_OPTIONS: --openssl-legacy-provider + run: yarn build - name: Run test step run: yarn test @@ -219,10 +221,10 @@ jobs: node: ['20.x'] steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Use node ${{ matrix.node }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} cache: 'yarn' @@ -230,7 +232,7 @@ jobs: - name: Install deps run: yarn install - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: package path: packages/toolkit From 14be7a2128ca349b2d7d3a5ae95d89808d0abe23 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 5 Mar 2024 15:28:40 -0600 Subject: [PATCH 2/2] Update `actions/setup-node` usages to v4 for `rtk-codemods` --- packages/rtk-codemods/.github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/rtk-codemods/.github/workflows/ci.yml b/packages/rtk-codemods/.github/workflows/ci.yml index e24a660c52..a802ecd39f 100644 --- a/packages/rtk-codemods/.github/workflows/ci.yml +++ b/packages/rtk-codemods/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v4 with: node-version: 12.x - name: install dependencies @@ -37,7 +37,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} - name: install dependencies @@ -51,7 +51,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v4 with: node-version: '12.x' - name: install dependencies