66
77 Build-AWG-MacOS :
88 name : ' AmneziaWG for MacOS'
9- runs-on : macos-11
9+ runs-on : macos-13
1010 if : |
1111 contains(github.event.head_commit.message, '[all]') ||
1212 contains(github.event.head_commit.message, '[macos]') ||
1919 uses : actions/checkout@v4
2020 with :
2121 repository : amnezia-vpn/amneziawg-go
22- ref : master
22+ ref : v0.2.13
2323 path : amneziawg-go
2424
25+ - name : ' Setup Go'
26+ uses : actions/setup-go@v4
27+ with :
28+ go-version : 1.24.4
29+ cache-dependency-path : go.sum
30+
2531 - name : ' Run build script'
2632 working-directory : amneziawg-go
2733 run : |
@@ -31,12 +37,62 @@ jobs:
3137 - name : ' Archive artifacts'
3238 uses : actions/upload-artifact@v4
3339 with :
34- name : awg-macos
40+ name : awg-macos-binary
3541 path : amneziawg-go/amneziawg-go
3642
43+ Build-AWG-macOS-NE :
44+ name : ' AmneziaWG for MacOS NE'
45+ runs-on : macos-13
46+ if : |
47+ contains(github.event.head_commit.message, '[all]') ||
48+ contains(github.event.head_commit.message, '[macos]') ||
49+ contains(github.event.head_commit.message, '[macos-awg]') ||
50+ contains(github.event.head_commit.message, '[macos-awg-ne]') ||
51+ contains(github.event.head_commit.message, '[awg]')
52+
53+ steps :
54+ - name : ' Get AmneziaWG'
55+ uses : actions/checkout@v4
56+ with :
57+ repository : amnezia-vpn/amneziawg-apple
58+ ref : v1.0.0
59+ path : amneziawg-apple
60+
61+ - name : ' Setup Go'
62+ uses : actions/setup-go@v4
63+ with :
64+ go-version : 1.24.4
65+ cache-dependency-path : go.sum
66+
67+ - name : ' Run build script'
68+ working-directory : amneziawg-apple/Sources/WireGuardKitGo
69+ run : |
70+ make build
71+
72+ - name : ' Verify fat binary for libwg-go.a'
73+ working-directory : amneziawg-apple/Sources/WireGuardKitGo/out
74+ run : |
75+ if [ ! -f libwg-go.a ]; then
76+ echo "Error: libwg-go.a not found!"
77+ exit 1
78+ fi
79+ info=$(lipo -info libwg-go.a)
80+ echo "$info"
81+ if [[ "$info" != *"x86_64"* || "$info" != *"arm64"* ]]; then
82+ echo "Error: libwg-go.a is not a fat (universal) binary."
83+ exit 1
84+ fi
85+
86+ - name : ' Archive artifacts'
87+ uses : actions/upload-artifact@v4
88+ with :
89+ name : awg-macos-libwg
90+ path : amneziawg-apple/Sources/WireGuardKitGo/out/libwg-go.a
91+
92+
3793 github-release :
3894 name : GitHub Release
39- needs : Build-AWG-MacOS
95+ needs : [ Build-AWG-MacOS, Build-AWG-macOS-NE]
4096 runs-on : ubuntu-latest
4197 if : startsWith(github.ref, 'refs/tags/')
4298
@@ -48,16 +104,21 @@ jobs:
48104 uses : actions/download-artifact@v4
49105
50106 - name : Setup | Checksums
51- run : for file in $(find ./ -name '*' ); do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done
107+ run : |
108+ for file in awg-macos-libwg/libwg-go.a awg-macos-binary/amneziawg-go; do
109+ openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"
110+ done
52111
53112 - name : Zip ALL
54- run : for file in *; do zip -r ${file%.*}.zip $file; done
113+ run : |
114+ zip -j libwg-go.a.zip awg-macos-libwg/libwg-go.a awg-macos-libwg/libwg-go.a.sha256
115+ zip -j amneziawg-go.zip awg-macos-binary/amneziawg-go awg-macos-binary/amneziawg-go.sha256
55116
56117 - name : Upload binaries to release
57118 uses : svenstaro/upload-release-action@v2
58119 with :
59120 repo_token : ${{ secrets.GITHUB_TOKEN }}
60- file : awg-macos .zip
121+ file : " * .zip"
61122 tag : ${{ github.ref }}
62123 overwrite : true
63124 file_glob : true
0 commit comments