Skip to content

Commit 6855d5f

Browse files
authored
Merge pull request #236 from NLipatov/feature/homebrew-tap
Add Homebrew tap auto-update to release workflow
2 parents 18ab8bd + 8d6ee64 commit 6855d5f

File tree

11 files changed

+370
-256
lines changed

11 files changed

+370
-256
lines changed

.github/workflows/release.yml

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,4 +312,68 @@ jobs:
312312
darwin/tungo-darwin-amd64
313313
darwin-arm64/tungo-darwin-arm64
314314
win/tungo-windows-x64.exe
315-
315+
316+
update-homebrew-tap:
317+
runs-on: ubuntu-latest
318+
needs: [create-release, version-and-tag]
319+
steps:
320+
- name: Checkout homebrew-tungo
321+
uses: actions/checkout@v4
322+
with:
323+
repository: NLipatov/homebrew-tungo
324+
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
325+
path: homebrew-tungo
326+
327+
- name: Update formula
328+
env:
329+
VERSION: ${{ needs.version-and-tag.outputs.tag_name }}
330+
run: |
331+
curl -fsSL -o darwin-arm64 "https://github.com/NLipatov/TunGo/releases/download/${VERSION}/tungo-darwin-arm64"
332+
curl -fsSL -o darwin-amd64 "https://github.com/NLipatov/TunGo/releases/download/${VERSION}/tungo-darwin-amd64"
333+
334+
SHA_ARM64=$(sha256sum darwin-arm64 | cut -d' ' -f1)
335+
SHA_AMD64=$(sha256sum darwin-amd64 | cut -d' ' -f1)
336+
337+
cat > homebrew-tungo/Formula/tungo.rb << 'FORMULA'
338+
class Tungo < Formula
339+
desc "Fast and secure VPN tunnel"
340+
homepage "https://github.com/NLipatov/TunGo"
341+
version "VERSION_PLACEHOLDER"
342+
license "AGPL-3.0-only"
343+
344+
on_macos do
345+
if Hardware::CPU.arm?
346+
url "https://github.com/NLipatov/TunGo/releases/download/#{version}/tungo-darwin-arm64"
347+
sha256 "SHA_ARM64_PLACEHOLDER"
348+
else
349+
url "https://github.com/NLipatov/TunGo/releases/download/#{version}/tungo-darwin-amd64"
350+
sha256 "SHA_AMD64_PLACEHOLDER"
351+
end
352+
end
353+
354+
def install
355+
if Hardware::CPU.arm?
356+
bin.install "tungo-darwin-arm64" => "tungo"
357+
else
358+
bin.install "tungo-darwin-amd64" => "tungo"
359+
end
360+
end
361+
362+
test do
363+
assert_match version.to_s, shell_output("#{bin}/tungo version")
364+
end
365+
end
366+
FORMULA
367+
368+
sed -i "s/VERSION_PLACEHOLDER/${VERSION}/" homebrew-tungo/Formula/tungo.rb
369+
sed -i "s/SHA_ARM64_PLACEHOLDER/${SHA_ARM64}/" homebrew-tungo/Formula/tungo.rb
370+
sed -i "s/SHA_AMD64_PLACEHOLDER/${SHA_AMD64}/" homebrew-tungo/Formula/tungo.rb
371+
372+
- name: Commit and push
373+
run: |
374+
cd homebrew-tungo
375+
git config user.name "github-actions[bot]"
376+
git config user.email "github-actions[bot]@users.noreply.github.com"
377+
git add Formula/tungo.rb
378+
git diff --staged --quiet || git commit -m "Update tungo to ${{ needs.version-and-tag.outputs.tag_name }}"
379+
git push

docs/TunGo/docs/1. QuickStart.mdx

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ See <a href="/docs/Advanced/Linux/Setup server systemd unit">this guide</a> to r
4646
chmod +x tungo
4747
sudo mv tungo /usr/local/bin/
4848
```
49-
49+
5050
:::tip Systemd client daemon (Linux)
5151
See <a href="/docs/Advanced/Linux/Setup client systemd unit">this guide</a> to run TunGo as a systemd service (autostart/restart on boot).
5252
:::
@@ -62,26 +62,31 @@ See <a href="/docs/Advanced/Linux/Setup server systemd unit">this guide</a> to r
6262
See <a href="/docs/Advanced/Linux/Setup client systemd unit">this guide</a> to run TunGo as a systemd service (autostart/restart on boot).
6363
:::
6464
</TabItem>
65-
<TabItem value="macos-arm64" label="macOS Apple Silicon">
66-
```bash
67-
curl -L -o tungo https://github.com/NLipatov/TunGo/releases/latest/download/tungo-darwin-arm64
68-
sudo mkdir -p /usr/local/bin
69-
chmod +x tungo
70-
sudo mv tungo /usr/local/bin/
71-
```
72-
</TabItem>
73-
<TabItem value="macos-amd64" label="macOS Intel">
74-
```bash
75-
curl -L -o tungo https://github.com/NLipatov/TunGo/releases/latest/download/tungo-darwin-amd64
76-
sudo mkdir -p /usr/local/bin
77-
chmod +x tungo
78-
sudo mv tungo /usr/local/bin/
79-
```
80-
</TabItem>
81-
<TabItem value="windows amd64" label="Windows amd64">
82-
Download and install from the [release page](https://github.com/NLipatov/TunGo/releases).
83-
</TabItem>
84-
</Tabs>
65+
<TabItem value="macos-brew" label="macOS brew">
66+
```bash
67+
brew install NLipatov/tungo/tungo
68+
```
69+
</TabItem>
70+
<TabItem value="macos-arm64" label="macOS arm manual">
71+
```bash
72+
curl -L -o tungo https://github.com/NLipatov/TunGo/releases/latest/download/tungo-darwin-arm64
73+
sudo mkdir -p /usr/local/bin
74+
chmod +x tungo
75+
sudo mv tungo /usr/local/bin/
76+
```
77+
</TabItem>
78+
<TabItem value="macos-amd64" label="macOS x86 manual">
79+
```bash
80+
curl -L -o tungo https://github.com/NLipatov/TunGo/releases/latest/download/tungo-darwin-amd64
81+
sudo mkdir -p /usr/local/bin
82+
chmod +x tungo
83+
sudo mv tungo /usr/local/bin/
84+
```
85+
</TabItem>
86+
<TabItem value="windows amd64" label="Windows amd64">
87+
Download and install from the [release page](https://github.com/NLipatov/TunGo/releases).
88+
</TabItem>
89+
</Tabs>
8590

8691
2️⃣ Launch tunnel
8792
<Tabs>

docs/TunGo/i18n/ar/docusaurus-plugin-content-docs/current/1. QuickStart.mdx

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -51,37 +51,42 @@ import TabItem from '@theme/TabItem';
5151
راجع <a href="/docs/Advanced/Linux/Setup client systemd unit">هذا الدليل</a> لتشغيل TunGo كخدمة systemd (بدء تلقائي/إعادة تشغيل عند الإقلاع).
5252
:::
5353
</TabItem>
54-
<TabItem value="linux-arm64" label="Linux arm64" default>
55-
```bash
56-
wget https://github.com/NLipatov/TunGo/releases/latest/download/tungo-linux-arm64 -O tungo
57-
chmod +x tungo
58-
sudo mv tungo /usr/local/bin/
59-
```
60-
61-
:::tip خدمة systemd للعميل (Linux)
62-
راجع <a href="/docs/Advanced/Linux/Setup client systemd unit">هذا الدليل</a> لتشغيل TunGo كخدمة systemd (بدء تلقائي/إعادة تشغيل عند الإقلاع).
63-
:::
64-
</TabItem>
65-
<TabItem value="macos-arm64" label="macOS Apple Silicon">
54+
<TabItem value="linux-arm64" label="Linux arm64">
6655
```bash
67-
curl -L -o tungo https://github.com/NLipatov/TunGo/releases/latest/download/tungo-darwin-arm64
68-
sudo mkdir -p /usr/local/bin
56+
wget https://github.com/NLipatov/TunGo/releases/latest/download/tungo-linux-arm64 -O tungo
6957
chmod +x tungo
7058
sudo mv tungo /usr/local/bin/
7159
```
60+
61+
:::tip خدمة systemd للعميل (Linux)
62+
راجع <a href="/docs/Advanced/Linux/Setup client systemd unit">هذا الدليل</a> لتشغيل TunGo كخدمة systemd (بدء تلقائي/إعادة تشغيل عند الإقلاع).
63+
:::
7264
</TabItem>
73-
<TabItem value="macos-amd64" label="macOS Intel">
74-
```bash
75-
curl -L -o tungo https://github.com/NLipatov/TunGo/releases/latest/download/tungo-darwin-amd64
76-
sudo mkdir -p /usr/local/bin
77-
chmod +x tungo
78-
sudo mv tungo /usr/local/bin/
79-
```
80-
</TabItem>
81-
<TabItem value="windows amd64" label="Windows amd64">
82-
قم بالتحميل والتثبيت من [صفحة الإصدارات](https://github.com/NLipatov/TunGo/releases).
83-
</TabItem>
84-
</Tabs>
65+
<TabItem value="macos-brew" label="macOS brew">
66+
```bash
67+
brew install NLipatov/tungo/tungo
68+
```
69+
</TabItem>
70+
<TabItem value="macos-arm64" label="macOS arm manual">
71+
```bash
72+
curl -L -o tungo https://github.com/NLipatov/TunGo/releases/latest/download/tungo-darwin-arm64
73+
sudo mkdir -p /usr/local/bin
74+
chmod +x tungo
75+
sudo mv tungo /usr/local/bin/
76+
```
77+
</TabItem>
78+
<TabItem value="macos-amd64" label="macOS x86 manual">
79+
```bash
80+
curl -L -o tungo https://github.com/NLipatov/TunGo/releases/latest/download/tungo-darwin-amd64
81+
sudo mkdir -p /usr/local/bin
82+
chmod +x tungo
83+
sudo mv tungo /usr/local/bin/
84+
```
85+
</TabItem>
86+
<TabItem value="windows amd64" label="Windows amd64">
87+
قم بالتحميل والتثبيت من [صفحة الإصدارات](https://github.com/NLipatov/TunGo/releases).
88+
</TabItem>
89+
</Tabs>
8590

8691
2️⃣ تشغيل النفق
8792
<Tabs>

docs/TunGo/i18n/de/docusaurus-plugin-content-docs/current/1. QuickStart.mdx

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -51,37 +51,42 @@ Siehe <a href="/docs/Advanced/Linux/Setup server systemd unit">diese Anleitung</
5151
Siehe <a href="/docs/Advanced/Linux/Setup client systemd unit">diese Anleitung</a>, um TunGo als systemd-Dienst auszuführen (automatischer Start/Neustart beim Booten).
5252
:::
5353
</TabItem>
54-
<TabItem value="linux-arm64" label="Linux arm64" default>
55-
```bash
56-
wget https://github.com/NLipatov/TunGo/releases/latest/download/tungo-linux-arm64 -O tungo
57-
chmod +x tungo
58-
sudo mv tungo /usr/local/bin/
59-
```
60-
61-
:::tip Systemd-Client-Daemon (Linux)
62-
Siehe <a href="/docs/Advanced/Linux/Setup client systemd unit">diese Anleitung</a>, um TunGo als systemd-Dienst auszuführen (automatischer Start/Neustart beim Booten).
63-
:::
64-
</TabItem>
65-
<TabItem value="macos-arm64" label="macOS Apple Silicon">
54+
<TabItem value="linux-arm64" label="Linux arm64">
6655
```bash
67-
curl -L -o tungo https://github.com/NLipatov/TunGo/releases/latest/download/tungo-darwin-arm64
68-
sudo mkdir -p /usr/local/bin
56+
wget https://github.com/NLipatov/TunGo/releases/latest/download/tungo-linux-arm64 -O tungo
6957
chmod +x tungo
7058
sudo mv tungo /usr/local/bin/
7159
```
60+
61+
:::tip Systemd-Client-Daemon (Linux)
62+
Siehe <a href="/docs/Advanced/Linux/Setup client systemd unit">diese Anleitung</a>, um TunGo als systemd-Dienst auszuführen (automatischer Start/Neustart beim Booten).
63+
:::
7264
</TabItem>
73-
<TabItem value="macos-amd64" label="macOS Intel">
74-
```bash
75-
curl -L -o tungo https://github.com/NLipatov/TunGo/releases/latest/download/tungo-darwin-amd64
76-
sudo mkdir -p /usr/local/bin
77-
chmod +x tungo
78-
sudo mv tungo /usr/local/bin/
79-
```
80-
</TabItem>
81-
<TabItem value="windows amd64" label="Windows amd64">
82-
Laden Sie von der [Release-Seite](https://github.com/NLipatov/TunGo/releases) herunter und installieren Sie.
83-
</TabItem>
84-
</Tabs>
65+
<TabItem value="macos-brew" label="macOS brew">
66+
```bash
67+
brew install NLipatov/tungo/tungo
68+
```
69+
</TabItem>
70+
<TabItem value="macos-arm64" label="macOS arm manual">
71+
```bash
72+
curl -L -o tungo https://github.com/NLipatov/TunGo/releases/latest/download/tungo-darwin-arm64
73+
sudo mkdir -p /usr/local/bin
74+
chmod +x tungo
75+
sudo mv tungo /usr/local/bin/
76+
```
77+
</TabItem>
78+
<TabItem value="macos-amd64" label="macOS x86 manual">
79+
```bash
80+
curl -L -o tungo https://github.com/NLipatov/TunGo/releases/latest/download/tungo-darwin-amd64
81+
sudo mkdir -p /usr/local/bin
82+
chmod +x tungo
83+
sudo mv tungo /usr/local/bin/
84+
```
85+
</TabItem>
86+
<TabItem value="windows amd64" label="Windows amd64">
87+
Laden Sie von der [Release-Seite](https://github.com/NLipatov/TunGo/releases) herunter und installieren Sie.
88+
</TabItem>
89+
</Tabs>
8590

8691
2️⃣ Tunnel starten
8792
<Tabs>

docs/TunGo/i18n/es/docusaurus-plugin-content-docs/current/1. QuickStart.mdx

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -51,37 +51,42 @@ Consulta <a href="/docs/Advanced/Linux/Setup server systemd unit">esta guía</a>
5151
Consulta <a href="/docs/Advanced/Linux/Setup client systemd unit">esta guía</a> para ejecutar TunGo como servicio systemd (inicio automático/reinicio al arrancar).
5252
:::
5353
</TabItem>
54-
<TabItem value="linux-arm64" label="Linux arm64" default>
55-
```bash
56-
wget https://github.com/NLipatov/TunGo/releases/latest/download/tungo-linux-arm64 -O tungo
57-
chmod +x tungo
58-
sudo mv tungo /usr/local/bin/
59-
```
60-
61-
:::tip Demonio systemd del cliente (Linux)
62-
Consulta <a href="/docs/Advanced/Linux/Setup client systemd unit">esta guía</a> para ejecutar TunGo como servicio systemd (inicio automático/reinicio al arrancar).
63-
:::
64-
</TabItem>
65-
<TabItem value="macos-arm64" label="macOS Apple Silicon">
54+
<TabItem value="linux-arm64" label="Linux arm64">
6655
```bash
67-
curl -L -o tungo https://github.com/NLipatov/TunGo/releases/latest/download/tungo-darwin-arm64
68-
sudo mkdir -p /usr/local/bin
56+
wget https://github.com/NLipatov/TunGo/releases/latest/download/tungo-linux-arm64 -O tungo
6957
chmod +x tungo
7058
sudo mv tungo /usr/local/bin/
7159
```
60+
61+
:::tip Demonio systemd del cliente (Linux)
62+
Consulta <a href="/docs/Advanced/Linux/Setup client systemd unit">esta guía</a> para ejecutar TunGo como servicio systemd (inicio automático/reinicio al arrancar).
63+
:::
7264
</TabItem>
73-
<TabItem value="macos-amd64" label="macOS Intel">
74-
```bash
75-
curl -L -o tungo https://github.com/NLipatov/TunGo/releases/latest/download/tungo-darwin-amd64
76-
sudo mkdir -p /usr/local/bin
77-
chmod +x tungo
78-
sudo mv tungo /usr/local/bin/
79-
```
80-
</TabItem>
81-
<TabItem value="windows amd64" label="Windows amd64">
82-
Descarga e instala desde la [página de releases](https://github.com/NLipatov/TunGo/releases).
83-
</TabItem>
84-
</Tabs>
65+
<TabItem value="macos-brew" label="macOS brew">
66+
```bash
67+
brew install NLipatov/tungo/tungo
68+
```
69+
</TabItem>
70+
<TabItem value="macos-arm64" label="macOS arm manual">
71+
```bash
72+
curl -L -o tungo https://github.com/NLipatov/TunGo/releases/latest/download/tungo-darwin-arm64
73+
sudo mkdir -p /usr/local/bin
74+
chmod +x tungo
75+
sudo mv tungo /usr/local/bin/
76+
```
77+
</TabItem>
78+
<TabItem value="macos-amd64" label="macOS x86 manual">
79+
```bash
80+
curl -L -o tungo https://github.com/NLipatov/TunGo/releases/latest/download/tungo-darwin-amd64
81+
sudo mkdir -p /usr/local/bin
82+
chmod +x tungo
83+
sudo mv tungo /usr/local/bin/
84+
```
85+
</TabItem>
86+
<TabItem value="windows amd64" label="Windows amd64">
87+
Descarga e instala desde la [página de releases](https://github.com/NLipatov/TunGo/releases).
88+
</TabItem>
89+
</Tabs>
8590

8691
2️⃣ Iniciar túnel
8792
<Tabs>

0 commit comments

Comments
 (0)