File tree Expand file tree Collapse file tree 2 files changed +34
-6
lines changed
Expand file tree Collapse file tree 2 files changed +34
-6
lines changed Original file line number Diff line number Diff line change 2020 args : " --target x86_64-apple-darwin"
2121 - platform : " ubuntu-22.04"
2222 args : " "
23+ - platform : " ubuntu-22.04-arm"
24+ args : " "
2325 - platform : " windows-latest"
2426 args : " "
2527 runs-on : ${{ matrix.platform }}
@@ -56,10 +58,10 @@ jobs:
5658 run : deno install
5759
5860 - name : install dependencies (ubuntu only)
59- if : matrix.platform == 'ubuntu-22.04'
61+ if : matrix.platform == 'ubuntu-22.04' || matrix.platform == 'ubuntu-22.04-arm'
6062 run : |
6163 sudo apt-get update
62- sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libudev-dev
64+ sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libudev-dev xdg-utils
6365
6466 - uses : tauri-apps/tauri-action@v0
6567 env :
Original file line number Diff line number Diff line change @@ -55,18 +55,44 @@ detect_family() {
5555fetch_latest_asset () {
5656 local ext=" $1 "
5757 local api_url=" https://api.github.com/repos/${GITHUB_REPO} /releases/latest"
58- local download_url=" "
58+ local arch arch_deb arch_rpm arch_pattern download_url
59+
60+ arch=" $( uname -m) "
61+ case " $arch " in
62+ x86_64)
63+ arch_deb=" amd64"
64+ arch_rpm=" x86_64"
65+ ;;
66+ aarch64)
67+ arch_deb=" arm64"
68+ arch_rpm=" aarch64"
69+ ;;
70+ * )
71+ msg_error " Unsupported architecture $arch "
72+ exit 1
73+ ;;
74+ esac
75+
76+ if [ " $ext " = " deb" ]; then
77+ arch_pattern=" ${arch_deb} "
78+ else
79+ arch_pattern=" ${arch_rpm} "
80+ fi
5981
6082 if has_cmd curl; then
61- download_url=$( curl -s --retry 3 --retry-delay 3 " $api_url " | grep -Eo " https://[^ \" ]+\\ .${ext} ([^\" ]*)" | head -n1 || true)
83+ download_url=$( curl -s --retry 3 --retry-delay 3 " $api_url " |
84+ grep -Eo " https://[^ \" ]+${arch_pattern} \.${ext} ([^\" ]*)" |
85+ head -n1 || true)
6286 elif has_cmd wget; then
63- download_url=$( wget -qO- --tries=3 " $api_url " | grep -Eo " https://[^ \" ]+\\ .${ext} ([^\" ]*)" | head -n1 || true)
87+ download_url=$( wget -qO- --tries=3 " $api_url " |
88+ grep -Eo " https://[^ \" ]+${arch_pattern} \.${ext} ([^\" ]*)" |
89+ head -n1 || true)
6490 fi
6591
6692 if [ -n " $download_url " ]; then
6793 echo " $download_url "
6894 else
69- msg_error " Failed to find a .${ext} release asset"
95+ msg_error " Failed to find a .${ext} release asset for arch $arch "
7096 return 1
7197 fi
7298}
You can’t perform that action at this time.
0 commit comments