Skip to content

Commit b4d3c78

Browse files
ci: modernize artifact action (#1056)
supersedes #1004 supersedes #1003 --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Jan Kowalleck <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 0a7ab0b commit b4d3c78

File tree

2 files changed

+19
-17
lines changed

2 files changed

+19
-17
lines changed

.github/workflows/nodejs.yml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
run: npm run build:${{ matrix.target }}
5454
- name: artifact build result
5555
# see https://github.com/actions/upload-artifact
56-
uses: actions/upload-artifact@v3
56+
uses: actions/upload-artifact@v4
5757
with:
5858
name: dist.${{ matrix.target }}
5959
path: dist.${{ matrix.target }}
@@ -92,7 +92,7 @@ jobs:
9292
reports: ${{ env.REPORTS_DIR }}/eslint.xml
9393
- name: artifact build result
9494
# see https://github.com/actions/upload-artifact
95-
uses: actions/upload-artifact@v3
95+
uses: actions/upload-artifact@v4
9696
if: ${{ failure() }}
9797
with:
9898
name: ${{ env.STANDARD_REPORTS_ARTIFACT }}
@@ -159,7 +159,7 @@ jobs:
159159
npm i --ignore-scripts --loglevel=silly --no-save $dev_requirements
160160
- name: fetch build artifact
161161
# see https://github.com/actions/download-artifact
162-
uses: actions/download-artifact@v3
162+
uses: actions/download-artifact@v4
163163
with:
164164
name: dist.node
165165
path: dist.node
@@ -175,9 +175,9 @@ jobs:
175175
- name: artifact test reports
176176
if: ${{ ! cancelled() }}
177177
# see https://github.com/actions/upload-artifact
178-
uses: actions/upload-artifact@v3
178+
uses: actions/upload-artifact@v4
179179
with:
180-
name: ${{ env.TESTS_REPORTS_ARTIFACT }}
180+
name: '${{ env.TESTS_REPORTS_ARTIFACT }}_regular_${{ matrix.os }}_node${{ matrix.node-version }}'
181181
path: ${{ env.REPORTS_DIR }}
182182
# test-web:
183183
# TODO via https://github.com/CycloneDX/cyclonedx-javascript-library/issues/51
@@ -204,7 +204,7 @@ jobs:
204204
npm i --ignore-scripts --omit=optional --no-save --loglevel=silly mocha c8 npm-run-all fast-glob
205205
- name: fetch build artifact
206206
# see https://github.com/actions/download-artifact
207-
uses: actions/download-artifact@v3
207+
uses: actions/download-artifact@v4
208208
with:
209209
name: dist.node
210210
path: dist.node
@@ -219,9 +219,9 @@ jobs:
219219
- name: artifact test reports
220220
if: ${{ ! cancelled() }}
221221
# see https://github.com/actions/upload-artifact
222-
uses: actions/upload-artifact@v3
222+
uses: actions/upload-artifact@v4
223223
with:
224-
name: ${{ env.TESTS_REPORTS_ARTIFACT }}
224+
name: '${{ env.TESTS_REPORTS_ARTIFACT }}_no-opt_${{ matrix.os }}_node${{ matrix.node-version }}'
225225
path: ${{ env.REPORTS_DIR }}
226226

227227
report-coverage:
@@ -234,14 +234,16 @@ jobs:
234234
steps:
235235
- name: fetch test artifacts
236236
# see https://github.com/actions/download-artifact
237-
uses: actions/download-artifact@v3
237+
uses: actions/download-artifact@v4
238238
with:
239-
name: ${{ env.TESTS_REPORTS_ARTIFACT }}
239+
pattern: '${{ env.TESTS_REPORTS_ARTIFACT }}_*'
240+
merge-multiple: true
240241
path: ${{ env.REPORTS_DIR }}
241242
- name: Run codacy-coverage-reporter
242243
env:
243244
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
244-
if: ${{ env.CODACY_PROJECT_TOKEN != '' }} ## see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-secrets
245+
## see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-secrets
246+
if: ${{ env.CODACY_PROJECT_TOKEN != '' }}
245247
# see https://github.com/codacy/codacy-coverage-reporter-action/blob/8a27d704d4ea6890aee42477b231c4fbbebac2ae/action.yml#L59
246248
run: |
247249
set -eux
@@ -276,7 +278,7 @@ jobs:
276278
node-version: ${{ env.NODE_ACTIVE_LTS }}
277279
- name: fetch build artifact 'node'
278280
# see https://github.com/actions/download-artifact
279-
uses: actions/download-artifact@v3
281+
uses: actions/download-artifact@v4
280282
with:
281283
name: dist.node
282284
path: dist.node
@@ -323,13 +325,13 @@ jobs:
323325
node-version: ${{ env.NODE_ACTIVE_LTS }}
324326
- name: fetch build artifact 'd'
325327
# see https://github.com/actions/download-artifact
326-
uses: actions/download-artifact@v3
328+
uses: actions/download-artifact@v4
327329
with:
328330
name: dist.d
329331
path: dist.d
330332
- name: fetch build artifact 'node'
331333
# see https://github.com/actions/download-artifact
332-
uses: actions/download-artifact@v3
334+
uses: actions/download-artifact@v4
333335
with:
334336
name: dist.node
335337
path: dist.node
@@ -379,7 +381,7 @@ jobs:
379381
node-version: ${{ env.NODE_ACTIVE_LTS }}
380382
- name: fetch build artifact 'node'
381383
# see https://github.com/actions/download-artifact
382-
uses: actions/download-artifact@v3
384+
uses: actions/download-artifact@v4
383385
with:
384386
name: dist.web
385387
path: dist.web

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112
npm pack --pack-destination "$PACKED_DIR"
113113
- name: artifact release result
114114
# see https://github.com/actions/upload-artifact
115-
uses: actions/upload-artifact@v3
115+
uses: actions/upload-artifact@v4
116116
with:
117117
name: ${{ env.PACKED_ARTIFACT }}
118118
path: ${{ env.PACKED_DIR }}/
@@ -130,7 +130,7 @@ jobs:
130130
steps:
131131
- name: fetch release result
132132
# see https://github.com/actions/download-artifact
133-
uses: actions/download-artifact@v3
133+
uses: actions/download-artifact@v4
134134
with:
135135
name: ${{ env.PACKED_ARTIFACT }}
136136
path: ${{ env.ASSETS_DIR }}

0 commit comments

Comments
 (0)