File tree Expand file tree Collapse file tree 2 files changed +20
-19
lines changed Expand file tree Collapse file tree 2 files changed +20
-19
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,6 @@ name: Update Homebrew Tap
3
3
on :
4
4
release :
5
5
types : [published]
6
- workflow_dispatch :
7
- inputs :
8
- version :
9
- description : " Version tag to use (e.g. v0.1.2)"
10
- required : true
11
6
12
7
jobs :
13
8
update-tap :
20
15
- name : Get release version
21
16
id : get_version
22
17
run : |
23
- if [[ "${GITHUB_EVENT_NAME}" == "release" ]]; then
24
- echo "tag=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
25
- elif [[ -n "${{ github.event.inputs.version }}" ]]; then
26
- echo "tag=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
27
- else
28
- echo "No version found. Exiting."
29
- exit 1
30
- fi
18
+ echo "tag=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
31
19
32
20
- name : Download release assets and compute SHA256
33
21
id : shasums
60
48
61
49
- name : Clone Homebrew tap repo
62
50
run : |
63
- git clone https://x-access-token:${{ secrets.TAP_GITHUB_TOKEN }}@github.com/elva-labs/homebrew-awsesh .git ../tap
51
+ git clone https://x-access-token:${{ secrets.TAP_GITHUB_TOKEN }}@github.com/elva-labs/homebrew-elva .git ../tap
64
52
65
53
- name : Commit updated formula
66
54
run : |
Original file line number Diff line number Diff line change @@ -3,12 +3,25 @@ class Awsesh < Formula
3
3
homepage "https://github.com/elva-labs/awsesh"
4
4
license "MIT"
5
5
6
- os = OS.mac? ? "darwin" : "linux"
7
- arch = Hardware::CPU.intel? ? "amd64" : "arm64"
8
- binary = "sesh-#{os}-#{arch}"
6
+ on_macos do
7
+ if Hardware::CPU.intel?
8
+ url "https://github.com/elva-labs/awsesh/releases/download/__VERSION__/sesh-darwin-amd64"
9
+ sha256 "__SHA_DARWIN_AMD64__"
10
+ elsif Hardware::CPU.arm?
11
+ url "https://github.com/elva-labs/awsesh/releases/download/__VERSION__/sesh-darwin-arm64"
12
+ sha256 "__SHA_DARWIN_ARM64__"
13
+ end
14
+ end
9
15
10
- url "https://github.com/elva-labs/awsesh/releases/download/__VERSION__/#{binary}"
11
- sha256 "__SHA_#{os.upcase}_#{arch.upcase}__"
16
+ on_linux do
17
+ if Hardware::CPU.intel?
18
+ url "https://github.com/elva-labs/awsesh/releases/download/__VERSION__/sesh-linux-amd64"
19
+ sha256 "__SHA_LINUX_AMD64__"
20
+ elsif Hardware::CPU.arm?
21
+ url "https://github.com/elva-labs/awsesh/releases/download/__VERSION__/sesh-linux-arm64"
22
+ sha256 "__SHA_LINUX_ARM64__"
23
+ end
24
+ end
12
25
13
26
def install
14
27
os = OS.mac? ? "darwin" : "linux"
You can’t perform that action at this time.
0 commit comments