Skip to content

Commit 55640f5

Browse files
committed
Add ARM64 support
1 parent e7bab65 commit 55640f5

File tree

1 file changed

+33
-20
lines changed

1 file changed

+33
-20
lines changed

.github/workflows/aur-publish.yml

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,22 @@ jobs:
2323
- name: Get checksums
2424
id: get_checksums
2525
run: |
26-
# Download the .deb file
26+
# Download the x86_64 .deb
2727
wget https://github.com/foss42/apidash/releases/download/v${{ steps.get_version.outputs.version }}/apidash-linux-amd64.deb
2828
29-
# Download the LICENSE file
29+
# Download the arm64 .deb
30+
wget https://github.com/foss42/apidash/releases/download/v${{ steps.get_version.outputs.version }}/apidash-linux-arm64.deb
31+
32+
# Download the LICENSE
3033
wget https://raw.githubusercontent.com/foss42/apidash/main/LICENSE
3134
3235
# Generate SHA512 checksums
33-
DEB_CHECKSUM=$(sha512sum apidash-linux-amd64.deb | awk '{print $1}')
36+
DEB_X86_64_CHECKSUM=$(sha512sum apidash-linux-amd64.deb | awk '{print $1}')
37+
DEB_ARM64_CHECKSUM=$(sha512sum apidash-linux-arm64.deb | awk '{print $1}')
3438
LICENSE_CHECKSUM=$(sha512sum LICENSE | awk '{print $1}')
3539
36-
echo "deb_checksum=$DEB_CHECKSUM" >> $GITHUB_OUTPUT
40+
echo "deb_x86_64_checksum=$DEB_X86_64_CHECKSUM" >> $GITHUB_OUTPUT
41+
echo "deb_arm64_checksum=$DEB_ARM64_CHECKSUM" >> $GITHUB_OUTPUT
3742
echo "license_checksum=$LICENSE_CHECKSUM" >> $GITHUB_OUTPUT
3843
3944
- name: Publish AUR package
@@ -47,29 +52,37 @@ jobs:
4752
pkgver=${{ steps.get_version.outputs.version }}
4853
pkgrel=1
4954
pkgdesc="Beautiful open-source cross-platform API Client"
50-
arch=('x86_64')
55+
arch=('x86_64' 'aarch64')
5156
url="https://apidash.dev"
5257
license=('Apache-2.0')
5358
depends=()
5459
options=('!emptydirs' '!strip')
55-
source=("https://github.com/foss42/apidash/releases/download/v${pkgver}/apidash-linux-amd64.deb"
56-
'LICENSE')
57-
sha512sums=('${{ steps.get_checksums.outputs.deb_checksum }}'
58-
'${{ steps.get_checksums.outputs.license_checksum }}')
60+
source=("LICENSE::https://raw.githubusercontent.com/foss42/apidash/main/LICENSE")
61+
source_x86_64=("apidash-linux-amd64.deb::https://github.com/foss42/apidash/releases/download/v${{ steps.get_version.outputs.version }}/apidash-linux-amd64.deb")
62+
source_aarch64=("apidash-linux-arm64.deb::https://github.com/foss42/apidash/releases/download/v${{ steps.get_version.outputs.version }}/apidash-linux-arm64.deb")
63+
sha512sums=('${{ steps.get_checksums.outputs.license_checksum }}')
64+
sha512sums_x86_64=('${{ steps.get_checksums.outputs.deb_x86_64_checksum }}')
65+
sha512sums_aarch64=('${{ steps.get_checksums.outputs.deb_arm64_checksum }}')
5966
6067
package() {
61-
bsdtar -xf data.tar.zst -C "$pkgdir/"
62-
63-
# Fix permissions of directories.
64-
find "$pkgdir/" -type d -exec chmod 755 {} \;
65-
66-
# Create a symlink inside the /usr/bin directory.
67-
mkdir -p "${pkgdir}/usr/bin"
68-
ln -s /usr/share/apidash/apidash "$pkgdir/usr/bin/apidash"
69-
70-
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/apidash/LICENSE
68+
if [ "$CARCH" = "x86_64" ]; then
69+
_debfile="$srcdir/apidash-linux-amd64.deb"
70+
elif [ "$CARCH" = "aarch64" ]; then
71+
_debfile="$srcdir/apidash-linux-arm64.deb"
72+
fi
73+
ar -x "${_debfile}" data.tar.zst
74+
bsdtar -xf data.tar.zst -C "$pkgdir/"
75+
76+
# Fix permissions of directories
77+
find "$pkgdir/" -type d -exec chmod 755 {} \;
78+
79+
# Create a symlink inside /usr/bin
80+
mkdir -p "${pkgdir}/usr/bin"
81+
ln -s /usr/share/apidash/apidash "$pkgdir/usr/bin/apidash"
82+
83+
install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
7184
}
7285
commit_username: ${{ secrets.AUR_USERNAME }}
7386
commit_email: ${{ secrets.AUR_EMAIL }}
7487
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
75-
commit_message: "Update to version ${{ steps.get_version.outputs.version }}"
88+
commit_message: "Update to version ${{ steps.get_version.outputs.version }}"

0 commit comments

Comments
 (0)