From 3903a1c1d6bfdb649136eef8ac9e6fb3ddd4b4c9 Mon Sep 17 00:00:00 2001 From: LongYinan Date: Tue, 26 Dec 2023 12:40:10 +0000 Subject: [PATCH] ci: update actions/upload-artifact and actions/download-artifact (#5408) --- .github/actions/download-core/action.yml | 2 +- .github/workflows/build-test.yml | 26 +++++++++++----------- .github/workflows/deploy.yml | 16 +++++++------- .github/workflows/publish-storybook.yml | 2 +- .github/workflows/release-desktop.yml | 28 ++++++++++++------------ .github/workflows/windows-signer.yml | 4 ++-- 6 files changed, 39 insertions(+), 39 deletions(-) diff --git a/.github/actions/download-core/action.yml b/.github/actions/download-core/action.yml index c70fcfbe9b80c..2746bd84551aa 100644 --- a/.github/actions/download-core/action.yml +++ b/.github/actions/download-core/action.yml @@ -9,7 +9,7 @@ runs: using: 'composite' steps: - name: Download tar.gz - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: core path: . diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index d95161ad8f2dc..ad0978fa25f47 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -140,7 +140,7 @@ jobs: - name: Upload test results if: ${{ failure() }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test-results-e2e-plugin path: ./test-results @@ -169,7 +169,7 @@ jobs: - name: Upload test results if: ${{ failure() }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test-results-e2e-${{ matrix.shard }} path: ./test-results @@ -194,7 +194,7 @@ jobs: - name: Upload test results if: ${{ failure() }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test-results-e2e-migration path: ./tests/affine-migration/test-results @@ -216,7 +216,7 @@ jobs: full-cache: true - name: Download affine.linux-x64-gnu.node - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: affine.linux-x64-gnu.node path: ./packages/frontend/native @@ -269,7 +269,7 @@ jobs: package: '@affine/native' nx_token: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} - name: Upload ${{ steps.filename.outputs.filename }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ steps.filename.outputs.filename }} path: ./packages/frontend/native/${{ steps.filename.outputs.filename }} @@ -296,7 +296,7 @@ jobs: package: '@affine/storage' nx_token: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} - name: Upload storage.node - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: storage.node path: ./packages/backend/storage/storage.node @@ -320,7 +320,7 @@ jobs: - name: zip core run: tar -czf dist.tar.gz --directory=packages/frontend/core/dist . - name: Upload core artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: core path: dist.tar.gz @@ -381,7 +381,7 @@ jobs: DATABASE_URL: postgresql://affine:affine@localhost:5432/affine - name: Download storage.node - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: storage.node path: ./packages/backend/server @@ -470,13 +470,13 @@ jobs: yarn workspace @affine/server data-migration run yarn workspace @affine/server exec node --loader ts-node/esm/transpile-only ./scripts/init-db.ts - name: Download storage.node - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: storage.node path: ./packages/backend/server - name: Download affine.linux-x64-gnu.node - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: affine.linux-x64-gnu.node path: ./packages/frontend/native @@ -490,7 +490,7 @@ jobs: - name: Upload test results if: ${{ failure() }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test-results-e2e-server path: ./tests/affine-cloud/test-results @@ -554,7 +554,7 @@ jobs: echo "filename=affine.$PLATFORM_ARCH_ABI.node" >> "$GITHUB_OUTPUT" - name: Download ${{ steps.filename.outputs.filename }} - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ steps.filename.outputs.filename }} path: ./packages/frontend/native @@ -596,7 +596,7 @@ jobs: - name: Upload test results if: ${{ failure() }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test-results-e2e-${{ matrix.spec.os }}-${{ matrix.spec.arch }} path: ./test-results diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 57827411bfd72..328f0068500b0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -32,7 +32,7 @@ jobs: - name: Build Server run: yarn workspace @affine/server build - name: Upload server dist - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: server-dist path: ./packages/backend/server/dist @@ -65,7 +65,7 @@ jobs: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_DSN: ${{ secrets.SENTRY_DSN }} - name: Upload core artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: core path: ./packages/frontend/core/dist @@ -89,7 +89,7 @@ jobs: package: '@affine/storage' nx_token: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} - name: Upload storage.node - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: storage.node path: ./packages/backend/storage/storage.node @@ -113,7 +113,7 @@ jobs: package: '@affine/storage' nx_token: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} - name: Upload storage.node - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: storage.arm64.node path: ./packages/backend/storage/storage.node @@ -130,22 +130,22 @@ jobs: steps: - uses: actions/checkout@v4 - name: Download core artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: core path: ./packages/frontend/core/dist - name: Download server dist - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: server-dist path: ./packages/backend/server/dist - name: Download storage.node - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: storage.node path: ./packages/backend/server - name: Download storage.node arm64 - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: storage.arm64.node path: ./packages/backend/storage diff --git a/.github/workflows/publish-storybook.yml b/.github/workflows/publish-storybook.yml index 166e795196fdd..9d2b40df5e02f 100644 --- a/.github/workflows/publish-storybook.yml +++ b/.github/workflows/publish-storybook.yml @@ -44,7 +44,7 @@ jobs: env: CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} NODE_OPTIONS: ${{ env.NODE_OPTIONS }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: chromatic-build-artifacts-${{ github.run_id }} diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.yml index 4e187e93d04e6..78f96b09cd57d 100644 --- a/.github/workflows/release-desktop.yml +++ b/.github/workflows/release-desktop.yml @@ -61,7 +61,7 @@ jobs: SKIP_NX_CACHE: 'true' - name: Upload core artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: core path: packages/frontend/electron/resources/web-static @@ -111,7 +111,7 @@ jobs: target: ${{ matrix.spec.target }} package: '@affine/native' nx_token: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: core path: packages/frontend/electron/resources/web-static @@ -147,7 +147,7 @@ jobs: mv packages/frontend/electron/out/*/make/AppImage/x64/*.AppImage ./builds/affine-${{ env.BUILD_TYPE }}-linux-x64.AppImage - name: Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: affine-${{ matrix.spec.platform }}-${{ matrix.spec.arch }}-builds path: builds @@ -187,7 +187,7 @@ jobs: target: ${{ matrix.spec.target }} package: '@affine/native' nx_token: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: core path: packages/frontend/electron/resources/web-static @@ -216,7 +216,7 @@ jobs: run: Compress-Archive -CompressionLevel Fastest -Path packages/frontend/electron/out/* -DestinationPath archive.zip - name: Save packaged artifacts for signing - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: packaged-${{ matrix.spec.platform }}-${{ matrix.spec.arch }} path: | @@ -250,7 +250,7 @@ jobs: timeout-minutes: 10 uses: ./.github/actions/setup-node - name: Download and overwrite packaged artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: signed-packaged-${{ matrix.spec.platform }}-${{ matrix.spec.arch }} path: . @@ -271,7 +271,7 @@ jobs: echo $FILES_TO_BE_SIGNED - name: Save installer for signing - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: installer-${{ matrix.spec.platform }}-${{ matrix.spec.arch }} path: archive.zip @@ -297,7 +297,7 @@ jobs: runs-on: ${{ matrix.spec.runner }} steps: - name: Download and overwrite installer artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: signed-installer-${{ matrix.spec.platform }}-${{ matrix.spec.arch }} path: . @@ -312,7 +312,7 @@ jobs: mv packages/frontend/electron/out/*/make/squirrel.windows/x64/*.msi ./builds/affine-${{ env.BUILD_TYPE }}-windows-x64.msi - name: Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: affine-${{ matrix.spec.platform }}-${{ matrix.spec.arch }}-builds path: builds @@ -323,29 +323,29 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: core path: web-static - name: Zip web-static run: zip -r web-static.zip web-static - name: Download Artifacts (macos-x64) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: affine-darwin-x64-builds path: ./ - name: Download Artifacts (macos-arm64) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: affine-darwin-arm64-builds path: ./ - name: Download Artifacts (windows-x64) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: affine-win32-x64-builds path: ./ - name: Download Artifacts (linux-x64) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: affine-linux-x64-builds path: ./ diff --git a/.github/workflows/windows-signer.yml b/.github/workflows/windows-signer.yml index 36229ff39045b..b5c8c36fdee73 100644 --- a/.github/workflows/windows-signer.yml +++ b/.github/workflows/windows-signer.yml @@ -14,7 +14,7 @@ jobs: env: ARCHIVE_DIR: ${{ github.run_id }}-${{ github.run_attempt }}-${{ inputs.artifact-name }} steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: ${{ inputs.artifact-name }} path: ${{ env.ARCHIVE_DIR }} @@ -36,7 +36,7 @@ jobs: cd ${{ env.ARCHIVE_DIR }} 7za a signed.zip .\out\* - name: upload - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: signed-${{ inputs.artifact-name }} path: ${{ env.ARCHIVE_DIR }}/signed.zip