Skip to content

Commit 49181ad

Browse files
authored
build(ci): Use v3 of artifact actions for node-profiling (#10522)
I should have read the comments on why we can't update this 😬 - we should still take some time to actually refactor this to work with the new actions, but for now this is fine. Also fixes some issues with the CI script for tarball handling etc.
1 parent 85f3199 commit 49181ad

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ env:
4949
${{ github.workspace }}/packages/utils/esm
5050
5151
BUILD_CACHE_KEY: ${{ github.event.inputs.commit || github.sha }}
52-
BUILD_CACHE_TARBALL_KEY: tarball-${{ github.event.inputs.commit || github.sha }}
52+
BUILD_PROFILING_NODE_CACHE_TARBALL_KEY: profiling-node-tarball-${{ github.event.inputs.commit || github.sha }}
5353

5454
# GH will use the first restore-key it finds that matches
5555
# So it will start by looking for one from the same branch, else take the newest one it can find elsewhere
@@ -403,15 +403,15 @@ jobs:
403403
uses: ./.github/actions/restore-cache
404404
env:
405405
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}
406-
- name: Profiling
406+
- name: Pack tarballs
407407
# Profiling tarball is built separately as we assemble the precompiled binaries
408408
run: yarn build:tarball --ignore @sentry/profiling-node
409409

410410
- name: Restore profiling tarball
411-
uses: actions/download-artifact@v4
411+
uses: actions/cache/restore@v4
412412
with:
413-
name: profiling-node-tarball-${{ github.sha }}
414-
path: packages/profiling-node
413+
key: ${{ env.BUILD_PROFILING_NODE_CACHE_TARBALL_KEY }}
414+
path: ${{ github.workspace }}/packages/*/*.tgz
415415

416416
- name: Archive artifacts
417417
uses: actions/upload-artifact@v4
@@ -1001,7 +1001,7 @@ jobs:
10011001
if: |
10021002
(needs.job_get_metadata.outputs.changed_profiling_node_bindings == 'true') ||
10031003
(github.event_name != 'pull_request')
1004-
uses: actions/download-artifact@v4
1004+
uses: actions/download-artifact@v3
10051005
with:
10061006
name: profiling-node-binaries-${{ github.sha }}
10071007
path: ${{ github.workspace }}/packages/profiling-node/lib/
@@ -1014,7 +1014,7 @@ jobs:
10141014
uses: actions/cache/save@v4
10151015
with:
10161016
path: ${{ github.workspace }}/packages/*/*.tgz
1017-
key: ${{ env.BUILD_CACHE_TARBALL_KEY }}
1017+
key: ${{ env.BUILD_PROFILING_NODE_CACHE_TARBALL_KEY }}
10181018

10191019
job_e2e_tests:
10201020
name: E2E ${{ matrix.label || matrix.test-application }} Test
@@ -1121,7 +1121,7 @@ jobs:
11211121
if: |
11221122
(needs.job_get_metadata.outputs.changed_profiling_node_bindings == 'true') ||
11231123
(github.event_name != 'pull_request')
1124-
uses: actions/download-artifact@v4
1124+
uses: actions/download-artifact@v3
11251125
with:
11261126
name: profiling-node-binaries-${{ github.sha }}
11271127
path: ${{ github.workspace }}/packages/profiling-node/lib/
@@ -1139,7 +1139,7 @@ jobs:
11391139
uses: actions/cache/restore@v4
11401140
with:
11411141
path: ${{ github.workspace }}/packages/*/*.tgz
1142-
key: ${{ env.BUILD_CACHE_TARBALL_KEY }}
1142+
key: ${{ env.BUILD_PROFILING_NODE_CACHE_TARBALL_KEY }}
11431143

11441144
- name: Get node version
11451145
id: versions
@@ -1481,7 +1481,7 @@ jobs:
14811481
- name: Archive Binary
14821482
# @TODO: v4 breaks convenient merging of same name artifacts
14831483
# https://github.com/actions/upload-artifact/issues/478
1484-
uses: actions/upload-artifact@v4
1484+
uses: actions/upload-artifact@v3
14851485
with:
14861486
name: profiling-node-binaries-${{ github.sha }}
14871487
path: |

0 commit comments

Comments
 (0)