Skip to content

Commit 98bcb2d

Browse files
Copilotfregante
andcommitted
Fix ESM workflow: properly use actions/download-artifact@v7
Instead of downgrading to v4, properly configure v7 by: - Adding explicit artifact name "package" to upload step - Specifying name and path parameters in all download steps - This ensures artifacts are downloaded to the correct location The v7 API requires explicit name/path configuration to avoid the extra directory level that was causing the previous failures. Co-authored-by: fregante <1402241+fregante@users.noreply.github.com>
1 parent c9f64be commit 98bcb2d

File tree

1 file changed

+33
-8
lines changed

1 file changed

+33
-8
lines changed

.github/workflows/esm-lint.yml

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,25 @@ jobs:
2525
- run: npm pack | tail -1 | xargs -n1 tar -xzf
2626
- uses: actions/upload-artifact@v6
2727
with:
28+
name: package
2829
path: package
2930
Publint:
3031
runs-on: ubuntu-latest
3132
needs: Pack
3233
steps:
33-
- uses: actions/download-artifact@v4
34+
- uses: actions/download-artifact@v7
35+
with:
36+
name: package
37+
path: artifact
3438
- run: npx publint ./artifact
3539
Webpack:
3640
runs-on: ubuntu-latest
3741
needs: Pack
3842
steps:
39-
- uses: actions/download-artifact@v4
43+
- uses: actions/download-artifact@v7
44+
with:
45+
name: package
46+
path: artifact
4047
- run: npm install --omit=dev ./artifact
4148
- run: echo "$IMPORT_STATEMENT" > index.js
4249
- run: webpack --entry ./index.js
@@ -45,7 +52,10 @@ jobs:
4552
runs-on: ubuntu-latest
4653
needs: Pack
4754
steps:
48-
- uses: actions/download-artifact@v4
55+
- uses: actions/download-artifact@v7
56+
with:
57+
name: package
58+
path: artifact
4959
- run: npm install --omit=dev ./artifact
5060
- run: echo "$IMPORT_STATEMENT" > index.js
5161
- run: >
@@ -57,15 +67,21 @@ jobs:
5767
runs-on: ubuntu-latest
5868
needs: Pack
5969
steps:
60-
- uses: actions/download-artifact@v4
70+
- uses: actions/download-artifact@v7
71+
with:
72+
name: package
73+
path: artifact
6174
- run: npm install --omit=dev ./artifact rollup@4 @rollup/plugin-json @rollup/plugin-node-resolve
6275
- run: echo "$IMPORT_STATEMENT" > index.js
6376
- run: npx rollup -p node-resolve -p @rollup/plugin-json index.js
6477
Vite:
6578
runs-on: ubuntu-latest
6679
needs: Pack
6780
steps:
68-
- uses: actions/download-artifact@v4
81+
- uses: actions/download-artifact@v7
82+
with:
83+
name: package
84+
path: artifact
6985
- run: npm install --omit=dev ./artifact
7086
- run: echo '<script type="module">$IMPORT_STATEMENT</script>' > index.html
7187
- run: npx vite build
@@ -74,7 +90,10 @@ jobs:
7490
runs-on: ubuntu-latest
7591
needs: Pack
7692
steps:
77-
- uses: actions/download-artifact@v4
93+
- uses: actions/download-artifact@v7
94+
with:
95+
name: package
96+
path: artifact
7897
- run: echo '{}' > package.json
7998
- run: echo "$IMPORT_STATEMENT" > index.js
8099
- run: npm install --omit=dev ./artifact
@@ -83,7 +102,10 @@ jobs:
83102
runs-on: ubuntu-latest
84103
needs: Pack
85104
steps:
86-
- uses: actions/download-artifact@v4
105+
- uses: actions/download-artifact@v7
106+
with:
107+
name: package
108+
path: artifact
87109
- run: echo '{"type":"module"}' > package.json
88110
- run: npm install --omit=dev ./artifact @sindresorhus/tsconfig
89111
- run: echo "$IMPORT_STATEMENT" > index.ts
@@ -96,7 +118,10 @@ jobs:
96118
runs-on: ubuntu-latest
97119
needs: Pack
98120
steps:
99-
- uses: actions/download-artifact@v4
121+
- uses: actions/download-artifact@v7
122+
with:
123+
name: package
124+
path: artifact
100125
- uses: actions/setup-node@v6
101126
with:
102127
node-version-file: artifact/package.json

0 commit comments

Comments
 (0)