Skip to content

Commit 98ce4ab

Browse files
authored
ci: simplify upload and download artifacts (#682)
1 parent 08cf80e commit 98ce4ab

File tree

6 files changed

+11
-32
lines changed

6 files changed

+11
-32
lines changed
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
name: Download Builds
22
description: Downloading the github artifact created with the build (dist folder)
33

4-
inputs:
5-
sha:
6-
description: 'SHA to use for the artifact name'
7-
required: false
8-
default: ${{ github.sha }}
9-
104
runs:
115
using: composite
126
steps:
137
- name: Download dist folder
148
uses: actions/download-artifact@v4
159
with:
16-
name: library-dist-${{ inputs.sha }}
10+
name: library-dist
1711
path: dist
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
name: Download Coverage Reports
22
description: Download the github artifact created with the `test --coverage`
33

4-
inputs:
5-
sha:
6-
description: 'SHA to use for the artifact name'
7-
required: false
8-
default: ${{ github.sha }}
9-
104
runs:
115
using: composite
126
steps:
137
- name: Download coverage report
148
uses: actions/download-artifact@v4
159
with:
16-
name: ngx-deploy-npm-coverage-report-${{ inputs.sha }}
10+
name: ngx-deploy-npm-coverage-report
1711
path: coverage/packages/ngx-deploy-npm
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
name: Download Lint Reports
22
description: Download the github artifact with the lint report
33

4-
inputs:
5-
sha:
6-
description: 'SHA to use for the artifact name'
7-
required: false
8-
default: ${{ github.sha }}
9-
104
runs:
115
using: composite
126
steps:
137
- name: Download lint report
148
uses: actions/download-artifact@v4
159
with:
16-
name: lint-report-${{ inputs.sha }}
10+
name: lint-report
1711
path: reports

.github/workflows/basic-test.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ name: Essential Test
22

33
on: workflow_call
44

5-
env:
6-
COMMIT_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
7-
85
jobs:
96
lint:
107
runs-on: ubuntu-latest
@@ -21,7 +18,7 @@ jobs:
2118
- name: Archive lint report results
2219
uses: actions/upload-artifact@v4
2320
with:
24-
name: lint-report-${{ env.COMMIT_SHA }}
21+
name: lint-report
2522
path: reports
2623

2724
build:
@@ -35,7 +32,7 @@ jobs:
3532
- name: Archive build result
3633
uses: actions/upload-artifact@v4
3734
with:
38-
name: library-dist-${{ env.COMMIT_SHA }}
35+
name: library-dist
3936
path: dist
4037

4138
unit-test:
@@ -65,5 +62,5 @@ jobs:
6562
name: Archive coverage report
6663
uses: actions/upload-artifact@v4
6764
with:
68-
name: ngx-deploy-npm-coverage-report-${{ env.COMMIT_SHA }}
65+
name: ngx-deploy-npm-coverage-report
6966
path: coverage/packages/ngx-deploy-npm/lcov.info

.github/workflows/compatibility-observability.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Archive build result
1717
uses: actions/upload-artifact@v4
1818
with:
19-
name: library-dist-${{ github.sha }}
19+
name: library-dist
2020
path: dist
2121

2222
backwards-compatibility-test:

.github/workflows/sonar-pr.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,19 @@ jobs:
7575
7676
// Download both artifacts
7777
await Promise.all([
78-
downloadArtifact(`ngx-deploy-npm-coverage-report-${sha}`),
79-
downloadArtifact(`lint-report-${sha}`)
78+
downloadArtifact('ngx-deploy-npm-coverage-report'),
79+
downloadArtifact('lint-report')
8080
]);
8181
8282
- name: 'Extract reports'
8383
run: |
8484
# Extract coverage report
8585
mkdir -p coverage/packages/ngx-deploy-npm
86-
unzip ngx-deploy-npm-coverage-report-*.zip -d coverage/packages/ngx-deploy-npm
86+
unzip ngx-deploy-npm-coverage-report.zip -d coverage/packages/ngx-deploy-npm
8787
8888
# Extract lint report
8989
mkdir -p reports
90-
unzip lint-report-*.zip -d reports
90+
unzip lint-report.zip -d reports
9191
9292
- name: SonarCloud Scan
9393
uses: sonarsource/sonarcloud-github-action@master

0 commit comments

Comments
 (0)