Skip to content

Commit 415aea1

Browse files
committed
ci(workflows): archive code coverage and production artifacts
Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
1 parent 0f80b75 commit 415aea1

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/ci.yml

+22
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
#
33
# References:
44
#
5+
# - https://docs.github.com/actions/automating-builds-and-tests/building-and-testing-nodejs
56
# - https://docs.github.com/actions/using-jobs/using-a-matrix-for-your-jobs
67
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#pull_request
78
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#push
89
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch
910
# - https://github.com/actions/checkout
11+
# - https://github.com/actions/upload-artifact
1012
# - https://github.com/hmarr/debug-action
1113

1214
---
@@ -87,3 +89,23 @@ jobs:
8789
run: yarn pack -o %s-%v.tgz
8890
env:
8991
NODE_ENV: production
92+
- id: package-version
93+
name: Get package version
94+
run: echo "result=$(jq .version package.json -r)" >> $GITHUB_OUTPUT
95+
- id: test-archive
96+
name: Archive code coverage results
97+
uses: actions/upload-artifact@v3.1.1
98+
with:
99+
name: |
100+
${{ format('@{0}-{1}-{2}-coverage', github.repository_owner, github.event.repository.name, steps.package-version.outputs.result) }}
101+
path: |
102+
coverage
103+
!coverage/tmp/
104+
!coverage/lcov.info
105+
- id: package-archive
106+
name: Archive production artifacts
107+
uses: actions/upload-artifact@v3.1.1
108+
with:
109+
name: |
110+
${{ format('@{0}-{1}-{2}', github.repository_owner, github.event.repository.name, steps.package-version.outputs.result) }}
111+
path: '*.tgz'

0 commit comments

Comments
 (0)