Skip to content

Commit d1902c3

Browse files
chore(deps): bump actions/download-artifact from 3 to 4 (#2389)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@v3...v4) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent fc37dcf commit d1902c3

File tree

3 files changed

+28
-32
lines changed

3 files changed

+28
-32
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ on:
4141
type: string
4242
default: ${{ github.head_ref }}
4343
outputs:
44+
artifact-id:
45+
value: ${{ jobs.build.outputs.artifact-id }}
4446
head-sha:
4547
value: ${{ jobs.build.outputs.head-sha }}
4648
base-sha:
@@ -65,6 +67,7 @@ jobs:
6567
outputs:
6668
head-sha: ${{ steps.set-SHAs.outputs.head }}
6769
base-sha: ${{ steps.set-SHAs.outputs.base }}
70+
artifact-id: ${{ steps.upload.outputs.artifact-id }}
6871
name: Build
6972
steps:
7073
- name: Check out code
@@ -105,27 +108,15 @@ jobs:
105108
run: yarn cache:clean
106109

107110
## --- BUILD --- ##
108-
- name: Check for cached build assets
109-
continue-on-error: true
110-
id: cache-build
111-
uses: actions/cache@v3
112-
with:
113-
path: |
114-
components/*/dist/**
115-
tokens/dist/**
116-
ui-icons/dist/**
117-
key: ${{ matrix.system }}-node${{ matrix.node-version }}-compiled-assets-${{ steps.set-SHAs.outputs.head }}
118-
119111
- name: Build components
120-
if: ${{ steps.cache-build.outputs.cache-hit != 'true' }}
121112
shell: bash
122113
run: yarn build
123114

124115
## --- UPLOAD (only ubuntu-latest at the moment) --- ##
125116
- name: Upload compiled assets & NX performance profile
126117
id: upload
127118
if: ${{ matrix.system == 'ubuntu-latest' }}
128-
uses: actions/upload-artifact@v3
119+
uses: actions/upload-artifact@v4
129120
with:
130121
path: |
131122
${{ github.workspace }}/components/*/dist/**

.github/workflows/compare-results.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ on:
2020
required: false
2121
type: string
2222
default: ${{ github.event.workflow_call.head.ref }}
23+
artifact-id:
24+
description: The artifact id to use for the build artifacts
25+
required: false
26+
type: string
2327
outputs:
2428
has-changed:
2529
value: ${{ jobs.compare.outputs.has-changed }}
@@ -74,13 +78,13 @@ jobs:
7478
run: yarn install --frozen-lockfile --cache-folder .cache/yarn
7579

7680
- name: Download build artifacts for head
77-
uses: actions/download-artifact@v3
81+
uses: actions/download-artifact@v4
7882
with:
7983
name: ubuntu-latest-node18-compiled-assets-${{ inputs.head-sha }}
8084
path: ${{ github.workspace }}/${{ inputs.head-sha }}
8185

8286
- name: Download build artifacts for base
83-
uses: actions/download-artifact@v3
87+
uses: actions/download-artifact@v4
8488
with:
8589
name: ubuntu-latest-node18-compiled-assets-${{ inputs.base-sha }}
8690
path: ${{ github.workspace }}/${{ inputs.base-sha }}
@@ -115,7 +119,7 @@ jobs:
115119
echo "key=ubuntu-latest-node18-compiled-assets-${{ matrix.branch }}" >> "$GITHUB_OUTPUT"
116120
117121
- name: Check if build artifacts already exist
118-
uses: actions/download-artifact@v3
122+
uses: actions/download-artifact@v4
119123
id: artifact-found
120124
continue-on-error: true
121125
with:
@@ -158,25 +162,26 @@ jobs:
158162
run: yarn install --frozen-lockfile --cache-folder .cache/yarn
159163

160164
## --- BUILD --- ##
161-
- name: Check for cached build assets
165+
- name: Check for built assets
162166
continue-on-error: true
163-
id: cache-build
164-
uses: actions/cache@v3
167+
id: download
168+
uses: actions/download-artifact@v4
165169
with:
166170
path: |
167-
components/*/dist/**
168-
tokens/dist/**
169-
ui-icons/dist/**
170-
key: ${{ steps.derive-key.outputs.key }}
171+
${{ github.workspace }}/components/*/dist/**
172+
${{ github.workspace }}/tokens/dist/**
173+
${{ github.workspace }}/ui-icons/dist/**
174+
name: ${{ steps.derive-key.outputs.key }}
171175

172176
- name: Build
173-
if: ${{ steps.cache-build.outputs.cache-hit != 'true' }}
177+
if: ${{ steps.download.outcome != 'success' }}
174178
shell: bash
175179
run: yarn build
176180

177181
- name: Upload compiled assets
182+
if: ${{ steps.download.outcome != 'success' }}
178183
id: upload
179-
uses: actions/upload-artifact@v3
184+
uses: actions/upload-artifact@v4
180185
with:
181186
path: |
182187
${{ github.workspace }}/components/*/dist/**

.github/workflows/publish-site.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,16 @@ jobs:
7878
run: yarn cache:clean
7979

8080
## --- BUILD --- ##
81-
- name: Check for cached build assets
81+
- name: Check for built assets
8282
continue-on-error: true
83-
id: cache-build
84-
uses: actions/cache@v3
83+
id: download
84+
uses: actions/download-artifact@v4
8585
with:
8686
path: |
87-
components/*/dist/**
88-
tokens/dist/**
89-
ui-icons/dist/**
90-
key: ubuntu-latest-node18-compiled-assets-${{ steps.set-SHAs.outputs.head }}
87+
components/*/dist/**
88+
tokens/dist/**
89+
ui-icons/dist/**
90+
name: ubuntu-latest-node18-compiled-assets-${{ steps.set-SHAs.outputs.head }}
9191

9292
- name: Build storybook site
9393
if: ${{ inputs.storybook-url == '' }}

0 commit comments

Comments
 (0)