-
Notifications
You must be signed in to change notification settings - Fork 20
82 lines (71 loc) · 2.32 KB
/
brew.yml
File metadata and controls
82 lines (71 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Homebrew Formula
on:
workflow_dispatch:
repository_dispatch:
types: [website-build]
pull_request:
paths:
- 'Formula/**'
- '.github/workflows/brew.yml'
push:
branches: [ master ]
tags: [ '[0-9]*.[0-9]*.[0-9]*' ]
jobs:
test-formula:
strategy:
matrix:
os: [macos-13, macos-14]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Homebrew environment
run: |
brew update-reset
brew --version
brew config
- name: Install Python 3.13
run: |
brew install python@3.13
brew link --overwrite python@3.13
python3 --version
brew --prefix python@3.13
ls -la $(brew --prefix python@3.13)/bin
- name: Style check
run: |
brew style ./Formula/ssh-studio.rb
- name: Add formula to tap and audit
run: |
# Create a local tap
brew tap-new --no-git local/ssh-studio
# Copy formula to the tap
cp ./Formula/ssh-studio.rb $(brew --repository local/ssh-studio)/Formula/
# Now audit the formula
brew audit --new --strict local/ssh-studio/ssh-studio
- name: Build and install
run: |
brew install --build-from-source local/ssh-studio/ssh-studio
- name: Test formula
run: |
ssh-studio &
sleep 2
brew test local/ssh-studio/ssh-studio
# Close the GUI app
pkill -f "SSH Studio" || true
pkill -f "ssh-studio" || true
- name: Test app bundle
run: |
# Test the .app bundle was created
ls -la "$(brew --prefix local/ssh-studio/ssh-studio)/Applications/SSH Studio.app"
# Test the launcher script
"$(brew --prefix local/ssh-studio/ssh-studio)/Applications/SSH Studio.app/Contents/MacOS/ssh-studio" --help &
sleep 2
# Close the GUI app
pkill -f "SSH Studio" || true
pkill -f "ssh-studio" || true
- name: Create bottle (optional)
run: |
brew uninstall --force local/ssh-studio/ssh-studio || true
brew install --build-bottle local/ssh-studio/ssh-studio
brew bottle --json local/ssh-studio/ssh-studio
continue-on-error: true