Skip to content

Commit ae59558

Browse files
committed
Fix DEB deploy
1 parent 85c6e72 commit ae59558

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

.github/workflows/ci-linux.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,15 @@ jobs:
330330
run: |
331331
echo "RELEASE_TAG_WITHOUT_PREFIX=$(cat ./release_tag_without_prefix.txt)" >> $GITHUB_ENV
332332
333+
- name: Rename artifacts
334+
run: |
335+
for file in $(find ./artifacts -type f -name "GitHubDesktop-linux-*"); do
336+
new_name=$(echo "$file" | sed -E "s/GitHubDesktop-linux-(.*)-[0-9]+\\.[0-9]+\\.[0-9]+(-beta[0-9]+)?\\.(.*)/GitHubDesktopPlus-${{ env.RELEASE_TAG_WITHOUT_PREFIX }}-linux-\\1.\\3/")
337+
new_name=$(echo $new_name | sed -E "s/linux-amd64/linux-x86_64/")
338+
new_name=$(echo $new_name | sed -E "s/linux-aarch64/linux-arm64/")
339+
mv --verbose "$file" "$new_name"
340+
done
341+
333342
- name: Install Debian repo tools
334343
run: |
335344
sudo apt-get update
@@ -339,14 +348,20 @@ jobs:
339348
run: |
340349
cd ./publish/deb
341350
rm -rf pool dists
342-
mkdir -p pool/main dists/stable/main/binary-amd64
351+
mkdir -p pool/main \
352+
dists/stable/main/binary-amd64 \
353+
dists/stable/main/binary-arm64 \
354+
dists/stable/main/binary-armhf
343355
344356
# Copy .deb packages into pool
345357
find ../../artifacts -type f -name "*.deb" -exec cp {} pool/main/ \;
346358
347-
# Generate the Packages index
348-
dpkg-scanpackages pool /dev/null > dists/stable/main/binary-amd64/Packages
349-
gzip -kf dists/stable/main/binary-amd64/Packages
359+
# Generate the Packages index for each architecture
360+
for arch in amd64 arm64 armhf; do
361+
mkdir -p dists/stable/main/binary-$arch
362+
dpkg-scanpackages pool /dev/null | awk -v arch=$arch '$0 ~ ("Architecture: " arch) || $0 !~ /^Architecture:/ { print }' > dists/stable/main/binary-$arch/Packages
363+
gzip -kf dists/stable/main/binary-$arch/Packages
364+
done
350365
351366
# Create the Release file
352367
apt-ftparchive -o APT::FTPArchive::Release::Codename=stable release dists/stable > dists/stable/Release

0 commit comments

Comments
 (0)