Skip to content

Commit cb62a09

Browse files
authored
Create build-socks5.yml
1 parent 9e6d58a commit cb62a09

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

.github/workflows/build-socks5.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Build and Release cloudflared with SOCKS5 support
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Version number, e.g. 1.0.0-socks5'
8+
required: true
9+
default: '1.0.0-socks5'
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
# 1️⃣ Checkout your fork master
17+
- name: Checkout fork master
18+
uses: actions/checkout@v4
19+
with:
20+
ref: master
21+
fetch-depth: 0 # full history required for merge
22+
23+
# 2️⃣ Add upstream and fetch PR commit
24+
- name: Add upstream and fetch PR #1020
25+
run: |
26+
git remote add upstream https://github.com/cloudflare/cloudflared.git
27+
git fetch upstream 0ff20abdcd4678914c1d62a44a667b449b3b7fd9
28+
git checkout -b pr-1020 FETCH_HEAD
29+
30+
# 3️⃣ Merge PR commit into master
31+
- name: Merge PR #1020 into master
32+
run: |
33+
git checkout master
34+
git merge --no-ff pr-1020 -m "Merge PR #1020: HTTP2 tunnel SOCKS5 support"
35+
36+
# 4️⃣ Setup Go
37+
- name: Setup Go
38+
uses: actions/setup-go@v4
39+
with:
40+
go-version: "1.21"
41+
42+
# 5️⃣ Build cloudflared
43+
- name: Build cloudflared
44+
run: |
45+
make cloudflared
46+
mkdir -p output
47+
cp ./cloudflared output/cloudflared
48+
49+
# 6️⃣ Upload artifact
50+
- name: Upload artifact
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: cloudflared-socks5
54+
path: output/cloudflared
55+
56+
# 7️⃣ Create GitHub Release
57+
- name: Create GitHub Release
58+
id: create_release
59+
uses: softprops/action-gh-release@v1
60+
with:
61+
tag_name: v${{ github.event.inputs.version }}
62+
name: cloudflared v${{ github.event.inputs.version }} (SOCKS5)
63+
body: "cloudflared compiled with SOCKS5 support (merged PR #1020)"
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
67+
# 8️⃣ Upload binary to Release
68+
- name: Upload binary to release
69+
uses: softprops/action-gh-release@v1
70+
with:
71+
files: output/cloudflared
72+
env:
73+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)