Repository navigation
262 lines (223 loc) · 8.81 KB
/
Copy pathrelease.yml
File metadata and controls
262 lines (223 loc) · 8.81 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
validate-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: '3.15'
- name: Validate release tag against source versions
env:
RELEASE_TAG: ${{ github.ref_name }}
run: python3 scripts/check-release-version.py "$RELEASE_TAG"
changelog:
needs: validate-version
runs-on: ubuntu-latest
outputs:
body: ${{ steps.changelog.outputs.content }}
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Generate changelog
id: changelog
uses: orhun/git-cliff-action@v4
with:
args: --latest --strip header
build:
needs: [validate-version, changelog]
strategy:
fail-fast: false
matrix:
include:
- target: aarch64-apple-darwin
runner: macos-latest
mcp_asset: furman-mcp-aarch64-apple-darwin
- target: x86_64-apple-darwin
runner: macos-latest
mcp_asset: furman-mcp-x86_64-apple-darwin
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v7
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Cache Rust dependencies
uses: swatinem/rust-cache@v2
with:
workspaces: src-tauri
- name: Install Node.js
uses: actions/setup-node@v7
with:
node-version: 26
cache: npm
- name: Install frontend dependencies
run: npm ci
# To enable code signing, uncomment the following and add these secrets
# to your repository settings:
# APPLE_CERTIFICATE - Base64-encoded .p12 certificate
# APPLE_CERTIFICATE_PASSWORD - Password for the .p12 file
# APPLE_SIGNING_IDENTITY - e.g. "Developer ID Application: Your Name (TEAMID)"
# APPLE_ID - Apple ID email for notarization
# APPLE_PASSWORD - App-specific password for notarization
# APPLE_TEAM_ID - Your Apple Developer Team ID
- name: Build MCP server binary
run: cargo build --release --bin furman-mcp --features mcp --target ${{ matrix.target }}
working-directory: src-tauri
- name: Upload furman-mcp release asset
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_BODY: ${{ needs.changelog.outputs.body }}
run: |
cp src-tauri/target/${{ matrix.target }}/release/furman-mcp ${{ matrix.mcp_asset }}
# Ensure release exists with the changelog as its body (tauri-action
# creates it later, but we need it now — and it does not update the
# body of an already-existing release). "|| true" tolerates the race
# where the other matrix job creates it between view and create.
if ! gh release view "${{ github.ref_name }}" --repo "${{ github.repository }}" >/dev/null 2>&1; then
printf '%s' "$RELEASE_BODY" > release-notes.md
gh release create "${{ github.ref_name }}" --repo "${{ github.repository }}" \
--title "Furman ${{ github.ref_name }}" --notes-file release-notes.md \
--draft=false --prerelease=false || true
fi
gh release upload "${{ github.ref_name }}" "${{ matrix.mcp_asset }}" \
--repo "${{ github.repository }}" --clobber
- name: Build Tauri app
uses: tauri-apps/tauri-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
# APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
# APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
# APPLE_ID: ${{ secrets.APPLE_ID }}
# APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
# APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
with:
tagName: ${{ github.ref_name }}
releaseName: "Furman ${{ github.ref_name }}"
releaseBody: ${{ needs.changelog.outputs.body }}
releaseDraft: false
prerelease: false
args: --target ${{ matrix.target }}
update-changelog:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
ref: main
fetch-depth: 0
- name: Prepend latest release notes to CHANGELOG.md
uses: orhun/git-cliff-action@v4
with:
args: --latest --prepend CHANGELOG.md
- name: Commit and push changelog
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add CHANGELOG.md
git diff --cached --quiet || {
git commit -m "Update CHANGELOG.md for ${GITHUB_REF_NAME}"
git push origin HEAD:main
}
update-homebrew:
needs: build
runs-on: ubuntu-latest
steps:
- name: Get version from tag
id: version
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
- name: Download release assets
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release download "$GITHUB_REF_NAME" \
--repo fenio/furman \
--pattern "*.dmg" --pattern "furman-mcp-*"
- name: Compute SHA256 checksums
id: sha
run: |
VERSION=${{ steps.version.outputs.version }}
echo "arm=$(sha256sum Furman_${VERSION}_aarch64.dmg | cut -d ' ' -f 1)" >> "$GITHUB_OUTPUT"
echo "intel=$(sha256sum Furman_${VERSION}_x64.dmg | cut -d ' ' -f 1)" >> "$GITHUB_OUTPUT"
echo "mcp_arm=$(sha256sum furman-mcp-aarch64-apple-darwin | cut -d ' ' -f 1)" >> "$GITHUB_OUTPUT"
echo "mcp_intel=$(sha256sum furman-mcp-x86_64-apple-darwin | cut -d ' ' -f 1)" >> "$GITHUB_OUTPUT"
- name: Checkout homebrew-tap
uses: actions/checkout@v7
with:
repository: fenio/homebrew-tap
token: ${{ secrets.TAP_GITHUB_TOKEN }}
- name: Update Furman cask
run: |
VERSION=${{ steps.version.outputs.version }}
ARM_SHA=${{ steps.sha.outputs.arm }}
INTEL_SHA=${{ steps.sha.outputs.intel }}
mkdir -p Casks
cat > Casks/furman.rb << CASK
cask "furman" do
version "${VERSION}"
on_arm do
sha256 "${ARM_SHA}"
url "https://github.com/fenio/furman/releases/download/v#{version}/Furman_#{version}_aarch64.dmg"
end
on_intel do
sha256 "${INTEL_SHA}"
url "https://github.com/fenio/furman/releases/download/v#{version}/Furman_#{version}_x64.dmg"
end
name "Furman"
desc "Dual-pane file manager for macOS"
homepage "https://github.com/fenio/furman"
app "Furman.app"
postflight_steps do
run "/usr/bin/xattr", args: ["-cr", "{{appdir}}/Furman.app"]
end
zap trash: [
"~/Library/Caches/com.furman.filemanager",
"~/Library/Preferences/com.furman.filemanager.plist",
]
end
CASK
- name: Update furman-mcp formula
run: |
VERSION=${{ steps.version.outputs.version }}
MCP_ARM_SHA=${{ steps.sha.outputs.mcp_arm }}
MCP_INTEL_SHA=${{ steps.sha.outputs.mcp_intel }}
mkdir -p Formula
cat > Formula/furman-mcp.rb << FORMULA
class FurmanMcp < Formula
desc "MCP server for S3 and SFTP operations (Furman)"
homepage "https://github.com/fenio/furman"
version "${VERSION}"
license "GPL-3.0-only"
on_arm do
url "https://github.com/fenio/furman/releases/download/v#{version}/furman-mcp-aarch64-apple-darwin"
sha256 "${MCP_ARM_SHA}"
end
on_intel do
url "https://github.com/fenio/furman/releases/download/v#{version}/furman-mcp-x86_64-apple-darwin"
sha256 "${MCP_INTEL_SHA}"
end
def install
bin.install Dir["furman-mcp-*"].first => "furman-mcp"
end
end
FORMULA
- name: Remove old formulae if they exist
run: |
git rm -f Formula/furman.rb 2>/dev/null || true
git rm -f Formula/furman-bin.rb 2>/dev/null || true
- name: Commit and push
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add Casks/furman.rb Formula/furman-mcp.rb
git commit -m "Update furman to ${{ steps.version.outputs.version }}"
git push