File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build
2
+ on :
3
+ push :
4
+ branches : [naive]
5
+ paths-ignore : [README.md]
6
+ release :
7
+ types : [published]
8
+ defaults :
9
+ run :
10
+ shell : bash
11
+ jobs :
12
+ build_caddy_with_naive :
13
+ runs-on : ubuntu-22.04
14
+ env :
15
+ BUNDLE : caddy-forwardproxy-naive
16
+ steps :
17
+ - uses : actions/checkout@v4
18
+ - uses : actions/setup-go@v5
19
+ with :
20
+ go-version : ^1.21.9
21
+ - run : go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest
22
+ - run : ~/go/bin/xcaddy build --with github.com/caddyserver/forwardproxy@master=$PWD
23
+ - name : Pack naiveproxy assets
24
+ run : |
25
+ mkdir ${{ env.BUNDLE }}
26
+ cp caddy LICENSE README.md ${{ env.BUNDLE }}
27
+ tar cJf ${{ env.BUNDLE }}.tar.xz ${{ env.BUNDLE }}
28
+ openssl sha256 ./caddy >sha256sum.txt
29
+ echo "SHA256SUM=$(cut -d' ' -f2 sha256sum.txt)" >>$GITHUB_ENV
30
+ - uses : actions/upload-artifact@v4
31
+ with :
32
+ name : ${{ env.BUNDLE }}.tar.xz caddy executable sha256 ${{ env.SHA256SUM }}
33
+ path : sha256sum.txt
34
+ - name : Upload caddy assets
35
+ if : ${{ github.event_name == 'release' }}
36
+ run : gh release upload "${GITHUB_REF##*/}" ${{ env.BUNDLE }}.tar.xz --clobber
37
+ env :
38
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments