Skip to content

Commit

Permalink
Ci/modernize artifact action (#1279)
Browse files Browse the repository at this point in the history
supersedes #1249
supersedes #1248

---------

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 25d2d50 commit 69764d7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

name: Node CI

on:
on:
push:
branches: [ "master" ]
pull_request:
Expand All @@ -14,7 +14,7 @@ on:
- cron: '42 23 * * 5'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: '${{ github.workflow }}-${{ github.ref }}'
cancel-in-progress: true

env:
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
run: npm run build
- name: artifact build result
# see https://github.com/actions/upload-artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
fail-fast: false
matrix:
os: [ "ubuntu-latest" ]
node-version:
node-version:
# action based on https://github.com/actions/node-versions/releases
# see also: https://nodejs.org/en/about/previous-releases
- "22" # current
Expand Down Expand Up @@ -136,7 +136,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
path: dist
Expand All @@ -156,9 +156,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 }}_${{ matrix.os }}_node${{ matrix.node-version }}'
path: ${{ env.REPORTS_DIR }}

test-examples:
Expand Down Expand Up @@ -186,7 +186,7 @@ jobs:
# cache-dependency-path: "**/package-lock.json"
- name: fetch build artifact
# see https://github.com/actions/download-artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: dist
path: dist
Expand All @@ -206,14 +206,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
uses: codacy/codacy-coverage-reporter-action@v1
with:
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 69764d7

Please sign in to comment.