-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
66f7c13
commit c9fd2eb
Showing
2 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Update Wox Cask | ||
|
||
on: | ||
workflow_dispatch: # only dispatch manually | ||
|
||
jobs: | ||
update_cask: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Update cask | ||
run: | | ||
LATEST_AMD64_FILENAME=$(curl --silent "https://api.github.com/repos/wox-launcher/wox/releases/latest" | grep 'mac-amd64' | sed -n 's/.*"name": "\(.*\)".*/\1/p') | ||
LATEST_AMD64_RELEASE=$(curl --silent "https://api.github.com/repos/wox-launcher/wox/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/') | ||
LATEST_AMD64_SHA=$(curl -sL "https://github.com/localsend/wox-launcher/releases/download/v${LATEST_RELEASE}/${LATEST_AMD64_FILENAME}" | sha256sum | cut -f 1 -d " ") | ||
echo "Latest amd64 release: $LATEST_AMD64_RELEASE" | ||
echo "Latest amd64 SHA: $LATEST_AMD64_SHA" | ||
LATEST_ARM64_FILENAME=$(curl --silent "https://api.github.com/repos/wox-launcher/wox/releases/latest" | grep 'mac-amd64' | sed -n 's/.*"name": "\(.*\)".*/\1/p') | ||
LATEST_ARM64_RELEASE=$(curl --silent "https://api.github.com/repos/wox-launcher/wox/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/') | ||
LATEST_ARM64_SHA=$(curl -sL "https://github.com/localsend/wox-launcher/releases/download/v${LATEST_RELEASE}/${LATEST_ARM64_FILENAME}" | sha256sum | cut -f 1 -d " ") | ||
echo "Latest arm64 release: $LATEST_ARM64_RELEASE" | ||
echo "Latest arm64 SHA: $LATEST_ARM64_SHA" | ||
echo "LATEST_AMD64_RELEASE=$LATEST_AMD64_RELEASE" >> $GITHUB_ENV | ||
- name: Commit and push changes | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
COMMIT_MSG="Update Wox cask to v${{ env.LATEST_AMD64_RELEASE }}" | ||
git config --local user.email "action@github.com" | ||
git config --local user.name "GitHub Action" | ||
git add Casks/wox.rb | ||
git commit -m "$COMMIT_MSG" | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
cask "wox" do | ||
arch arm: "arm64", intel: "x86_64" | ||
|
||
on_arm do | ||
version "v2.0.0-nightly" | ||
sha256 "aae104dc1267ad6da27c6deb506c6048b03848a95a7c42ad953297516c8e419d" | ||
filename "wox-mac-arm64-20240807-5c43a4.dmg" | ||
end | ||
on_intel do | ||
version "v2.0.0-nightly" | ||
sha256 "d57314b3c9243fa9e5df1a6a169e464ec3b4c5bca536a0edcae5d57a3ed53bd1" | ||
filename "wox-mac-amd64-20240807-a78e72.dmg" | ||
end | ||
|
||
url "https://github.com/Wox-launcher/Wox/releases/download/#{version}/#{filename}" | ||
name "Wox" | ||
desc "A cross-platform launcher that simply works" | ||
homepage "https://github.com/Wox-launcher/Wox" | ||
|
||
depends_on macos: ">= :big_sur" | ||
|
||
app "Wox.app" | ||
end |