Skip to content

Commit f5ac296

Browse files
committed
Refine universal binary build job
- Add missing `GITHUB_TOKEN` for download. This is neeeded even for the download step because the release is a draft. (Even if that is changed, it may be made a draft manually during creation under some conditions, which would not usually signal a wish that the Universal 2 binary archive specifically be omitted.) - Break up into more steps.
1 parent 3054aed commit f5ac296

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,17 +247,28 @@ jobs:
247247
- name: Obtain single-architecture releases
248248
run: |
249249
gh release download "$VERSION" --pattern="$(name aarch64).tar.gz" --pattern="$(name x86_64).tar.gz"
250+
env:
251+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
252+
253+
- name: Unpack single-architecture releases
254+
run: |
250255
tar xf "$(name aarch64).tar.gz"
251256
tar xf "$(name x86_64).tar.gz"
252257
253-
- name: Repack into Universal-2 release
258+
- name: Pre-populate directory for archive
254259
run: |
255260
cp -R -- "$(name aarch64)" "$(name universal)"
256261
rm -- "$(name universal)"/{ein,gix}
262+
263+
- name: Create Universal 2 binaries
264+
run: |
257265
for bin in ein gix; do
258266
lipo -create "$(name aarch64)/$bin" "$(name x86_64)/$bin" -output "$(name universal)/$bin"
267+
file "$(name universal)/$bin"
259268
done
260-
file "$(name universal)"/{ein,gix}
269+
270+
- name: Build archive
271+
run: |
261272
tar czf "$(name universal).tar.gz" "$(name universal)"
262273
echo "ASSET=$(name universal).tar.gz" >> "$GITHUB_ENV"
263274

0 commit comments

Comments
 (0)