Skip to content

Commit 15931d7

Browse files
committed
fix(ci): rename release artifacts to include architecture
Both architectures produce SUSTN.app.tar.gz, causing a name collision on the GitHub release. Rename to include the target triple before upload.
1 parent 5cf27d7 commit 15931d7

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

.github/workflows/release.yaml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,32 @@ jobs:
8888
- name: Debug artifact structure
8989
run: find artifacts -type f | head -30
9090

91+
- name: Rename artifacts to include architecture
92+
run: |
93+
for arch in aarch64-apple-darwin x86_64-apple-darwin; do
94+
dir="artifacts/artifacts-${arch}/macos"
95+
for f in "$dir"/*.app.tar.gz; do
96+
base=$(basename "$f" .app.tar.gz)
97+
mv "$f" "$dir/${base}_${arch}.app.tar.gz"
98+
done
99+
for f in "$dir"/*.app.tar.gz.sig; do
100+
base=$(basename "$f" .app.tar.gz.sig)
101+
mv "$f" "$dir/${base}_${arch}.app.tar.gz.sig"
102+
done
103+
done
104+
91105
- name: Generate latest.json
92106
run: |
93107
VERSION="${GITHUB_REF_NAME#v}"
94108
DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
95109
96110
# Read signature files
97-
AARCH64_SIG=$(cat artifacts/artifacts-aarch64-apple-darwin/macos/*.app.tar.gz.sig)
98-
X86_64_SIG=$(cat artifacts/artifacts-x86_64-apple-darwin/macos/*.app.tar.gz.sig)
111+
AARCH64_SIG=$(cat artifacts/artifacts-aarch64-apple-darwin/macos/*_aarch64-apple-darwin.app.tar.gz.sig)
112+
X86_64_SIG=$(cat artifacts/artifacts-x86_64-apple-darwin/macos/*_x86_64-apple-darwin.app.tar.gz.sig)
99113
100114
# Get filenames
101-
AARCH64_TAR=$(basename artifacts/artifacts-aarch64-apple-darwin/macos/*.app.tar.gz)
102-
X86_64_TAR=$(basename artifacts/artifacts-x86_64-apple-darwin/macos/*.app.tar.gz)
115+
AARCH64_TAR=$(basename artifacts/artifacts-aarch64-apple-darwin/macos/*_aarch64-apple-darwin.app.tar.gz)
116+
X86_64_TAR=$(basename artifacts/artifacts-x86_64-apple-darwin/macos/*_x86_64-apple-darwin.app.tar.gz)
103117
104118
cat > latest.json << EOF
105119
{

0 commit comments

Comments
 (0)