From 415aea12b81fc7c960ae59e21681ee643117b144 Mon Sep 17 00:00:00 2001 From: Lexus Drumgold Date: Fri, 25 Nov 2022 19:23:17 -0500 Subject: [PATCH] ci(workflows): archive code coverage and production artifacts Signed-off-by: Lexus Drumgold --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e11b88e..05617fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,11 +2,13 @@ # # References: # +# - https://docs.github.com/actions/automating-builds-and-tests/building-and-testing-nodejs # - https://docs.github.com/actions/using-jobs/using-a-matrix-for-your-jobs # - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#pull_request # - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#push # - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch # - https://github.com/actions/checkout +# - https://github.com/actions/upload-artifact # - https://github.com/hmarr/debug-action --- @@ -87,3 +89,23 @@ jobs: run: yarn pack -o %s-%v.tgz env: NODE_ENV: production + - id: package-version + name: Get package version + run: echo "result=$(jq .version package.json -r)" >> $GITHUB_OUTPUT + - id: test-archive + name: Archive code coverage results + uses: actions/upload-artifact@v3.1.1 + with: + name: | + ${{ format('@{0}-{1}-{2}-coverage', github.repository_owner, github.event.repository.name, steps.package-version.outputs.result) }} + path: | + coverage + !coverage/tmp/ + !coverage/lcov.info + - id: package-archive + name: Archive production artifacts + uses: actions/upload-artifact@v3.1.1 + with: + name: | + ${{ format('@{0}-{1}-{2}', github.repository_owner, github.event.repository.name, steps.package-version.outputs.result) }} + path: '*.tgz'