Skip to content

Commit

Permalink
ci: modernize artifact action (#1056)
Browse files Browse the repository at this point in the history
supersedes #1004
supersedes #1003

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
jkowalleck and dependabot[bot] committed May 2, 2024
1 parent 0a7ab0b commit b4d3c78
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
32 changes: 17 additions & 15 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
run: npm run build:${{ matrix.target }}
- name: artifact build result
# see https://github.com/actions/upload-artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist.${{ matrix.target }}
path: dist.${{ matrix.target }}
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
reports: ${{ env.REPORTS_DIR }}/eslint.xml
- name: artifact build result
# see https://github.com/actions/upload-artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: ${{ env.STANDARD_REPORTS_ARTIFACT }}
Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:
npm i --ignore-scripts --loglevel=silly --no-save $dev_requirements
- name: fetch build artifact
# see https://github.com/actions/download-artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: dist.node
path: dist.node
Expand All @@ -175,9 +175,9 @@ jobs:
- name: artifact test reports
if: ${{ ! cancelled() }}
# see https://github.com/actions/upload-artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.TESTS_REPORTS_ARTIFACT }}
name: '${{ env.TESTS_REPORTS_ARTIFACT }}_regular_${{ matrix.os }}_node${{ matrix.node-version }}'
path: ${{ env.REPORTS_DIR }}
# test-web:
# TODO via https://github.com/CycloneDX/cyclonedx-javascript-library/issues/51
Expand All @@ -204,7 +204,7 @@ jobs:
npm i --ignore-scripts --omit=optional --no-save --loglevel=silly mocha c8 npm-run-all fast-glob
- name: fetch build artifact
# see https://github.com/actions/download-artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: dist.node
path: dist.node
Expand All @@ -219,9 +219,9 @@ jobs:
- name: artifact test reports
if: ${{ ! cancelled() }}
# see https://github.com/actions/upload-artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.TESTS_REPORTS_ARTIFACT }}
name: '${{ env.TESTS_REPORTS_ARTIFACT }}_no-opt_${{ matrix.os }}_node${{ matrix.node-version }}'
path: ${{ env.REPORTS_DIR }}

report-coverage:
Expand All @@ -234,14 +234,16 @@ jobs:
steps:
- name: fetch test artifacts
# see https://github.com/actions/download-artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ env.TESTS_REPORTS_ARTIFACT }}
pattern: '${{ env.TESTS_REPORTS_ARTIFACT }}_*'
merge-multiple: true
path: ${{ env.REPORTS_DIR }}
- name: Run codacy-coverage-reporter
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
if: ${{ env.CODACY_PROJECT_TOKEN != '' }} ## see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-secrets
## see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-secrets
if: ${{ env.CODACY_PROJECT_TOKEN != '' }}
# see https://github.com/codacy/codacy-coverage-reporter-action/blob/8a27d704d4ea6890aee42477b231c4fbbebac2ae/action.yml#L59
run: |
set -eux
Expand Down Expand Up @@ -276,7 +278,7 @@ jobs:
node-version: ${{ env.NODE_ACTIVE_LTS }}
- name: fetch build artifact 'node'
# see https://github.com/actions/download-artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: dist.node
path: dist.node
Expand Down Expand Up @@ -323,13 +325,13 @@ jobs:
node-version: ${{ env.NODE_ACTIVE_LTS }}
- name: fetch build artifact 'd'
# see https://github.com/actions/download-artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: dist.d
path: dist.d
- name: fetch build artifact 'node'
# see https://github.com/actions/download-artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: dist.node
path: dist.node
Expand Down Expand Up @@ -379,7 +381,7 @@ jobs:
node-version: ${{ env.NODE_ACTIVE_LTS }}
- name: fetch build artifact 'node'
# see https://github.com/actions/download-artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: dist.web
path: dist.web
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
npm pack --pack-destination "$PACKED_DIR"
- name: artifact release result
# see https://github.com/actions/upload-artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKED_ARTIFACT }}
path: ${{ env.PACKED_DIR }}/
Expand All @@ -130,7 +130,7 @@ jobs:
steps:
- name: fetch release result
# see https://github.com/actions/download-artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ env.PACKED_ARTIFACT }}
path: ${{ env.ASSETS_DIR }}
Expand Down

0 comments on commit b4d3c78

Please sign in to comment.