Skip to content

Commit beba426

Browse files
committed
Adding brew workflow
1 parent 3090f1c commit beba426

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/brew.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Homebrew Formula
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
paths:
7+
- 'Formula/ssh-studio.rb'
8+
- '.github/workflows/brew.yml'
9+
push:
10+
branches: [ master ]
11+
12+
jobs:
13+
test-formula:
14+
strategy:
15+
matrix:
16+
os: [macos-13, macos-14]
17+
runs-on: ${{ matrix.os }}
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Setup Homebrew environment
24+
run: |
25+
brew update-reset
26+
brew --version
27+
brew config
28+
29+
- name: Style check
30+
run: |
31+
brew style ./Formula/ssh-studio.rb
32+
33+
- name: Audit formula
34+
run: |
35+
brew audit --new-formula --strict ./Formula/ssh-studio.rb
36+
37+
- name: Build and install
38+
run: |
39+
brew install --build-from-source ./Formula/ssh-studio.rb
40+
41+
- name: Test formula
42+
run: |
43+
ssh-studio --help
44+
brew test ssh-studio
45+
46+
- name: Test app bundle
47+
run: |
48+
# Test the .app bundle was created
49+
ls -la "$(brew --prefix ssh-studio)/Applications/SSH Studio.app"
50+
# Test the launcher script
51+
"$(brew --prefix ssh-studio)/Applications/SSH Studio.app/Contents/MacOS/ssh-studio" --help
52+
53+
- name: Create bottle (optional)
54+
run: |
55+
brew uninstall --force ssh-studio || true
56+
brew install --build-bottle ./Formula/ssh-studio.rb
57+
brew bottle --json ssh-studio
58+
continue-on-error: true

0 commit comments

Comments
 (0)