Skip to content

Commit f086c1d

Browse files
committed
Stop double-zipping workflow artifacts
1 parent b8a30d7 commit f086c1d

1 file changed

Lines changed: 26 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
env: { CONTAINER: "${{matrix.container}}", BUILD_CMD: "" }
6767
steps:
6868
- name: Check out repository
69-
uses: actions/checkout@v3
69+
uses: actions/checkout@v7
7070

7171
- name: Set up container (Linux)
7272
if: runner.os == 'Linux'
@@ -133,11 +133,11 @@ jobs:
133133
if [ "$RUNNER_OS" = "macOS" ]; then
134134
for ext in dmg zip; do
135135
if [ -f "build/${BASENAME}.${ext}" ]; then
136-
echo "package_path=build/${BASENAME}.${ext}" >> $GITHUB_OUTPUT
136+
echo "package1=build/${BASENAME}.${ext}" >> $GITHUB_OUTPUT
137137
exit 0
138138
fi
139139
done
140-
140+
141141
echo "ERROR: No macOS package found"
142142
exit 1
143143
else
@@ -146,14 +146,32 @@ jobs:
146146
echo "ERROR: No package found"
147147
exit 1
148148
fi
149-
echo "package_path=build/${BASENAME}*" >> $GITHUB_OUTPUT
149+
if [ "${#files[@]}" -gt 3 ]; then
150+
echo "ERROR: More than three packages found"
151+
exit 1
152+
fi
153+
echo "package1=${files[0]}" >> $GITHUB_OUTPUT
154+
echo "package2=${files[1]}" >> $GITHUB_OUTPUT
155+
echo "package3=${files[2]}" >> $GITHUB_OUTPUT
150156
fi
151157
152-
- name: Upload package
153-
uses: actions/upload-artifact@v4
158+
- name: Upload package one
159+
uses: actions/upload-artifact@v7
160+
with:
161+
path: ${{steps.resolve.outputs.package1}}
162+
archive: false
163+
- name: Upload package two
164+
if: steps.resolve.outputs.package2
165+
uses: actions/upload-artifact@v7
166+
with:
167+
path: ${{steps.resolve.outputs.package2}}
168+
archive: false
169+
- name: Upload package three
170+
if: steps.resolve.outputs.package3
171+
uses: actions/upload-artifact@v7
154172
with:
155-
name: ${{steps.package.outputs.output-basename}}
156-
path: ${{steps.resolve.outputs.package_path}}
173+
path: ${{steps.resolve.outputs.package3}}
174+
archive: false
157175
- name: Generate summary
158176
shell: bash
159177
run: >

0 commit comments

Comments
 (0)