@@ -4,7 +4,6 @@ on: [push]
44
55
66jobs :
7-
87 Build-Cloak :
98 name : ' Build-Cloak'
109 runs-on : ubuntu-latest
5251 mkdir ./release/plugin/linux
5352 CGO_ENABLED=1 GOOS="linux" GOARCH="amd64" go build -v -o ./release/plugin/linux/ck-ovpn-plugin.a -buildmode=c-archive ./cmd/ck-ovpn-plugin/
5453 mkdir ./release/plugin/windows
55- CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS="windows" GOARCH="amd64" go build -v -o ./release/plugin/windows/ck-ovpn-plugin.dll -buildmode=c-shared ./cmd/ck-ovpn-plugin/
54+ CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS="windows" GOARCH="amd64" go build -v -o ./release/plugin/windows/ck-ovpn-plugin.dll -buildmode=c-shared ./cmd/ck-ovpn-plugin/
5655
5756 - name : Archive Linux client binary
5857 uses : actions/upload-artifact@v3
9089 path : ' ~/work/3rd-build-ga/3rd-build-ga/Cloak/release/plugin'
9190
9291 Build-Cloak-MacOS :
93- runs-on : macos-12
92+ runs-on : macos-13
9493 if : |
9594 contains(github.event.head_commit.message, '[all]') ||
9695 contains(github.event.head_commit.message, '[macos]') ||
@@ -100,16 +99,17 @@ jobs:
10099 steps :
101100
102101 - name : Get Cloak
103- uses : actions/checkout@v3
102+ uses : actions/checkout@v4
104103 with :
105104 repository : amnezia-vpn/Cloak
106105 ref : master-amnezia
107106 path : Cloak
108107
109- # - name: 'Run build script'
110- # working-directory: Cloak
111- # run: |
112- # CGO_ENABLED=1 GOOS="darwin" GOARCH="amd64" go build -v -o ./release/plugin/darwin/ck-ovpn-plugin.a -buildmode=c-archive ./cmd/ck-ovpn-plugin/
108+ - name : Set up Go
109+ uses : actions/setup-go@v5
110+ with :
111+ go-version : ' 1.21'
112+
113113 - name : Build for x86_64
114114 working-directory : Cloak
115115 run : |
@@ -126,14 +126,15 @@ jobs:
126126 lipo -create -output ./release/plugin/darwin/ck-ovpn-plugin.a \
127127 ./release/plugin/darwin/ck-ovpn-plugin-x86_64.a \
128128 ./release/plugin/darwin/ck-ovpn-plugin-arm64.a
129+
129130 - name : Archive artifacts
130- uses : actions/upload-artifact@v3
131+ uses : actions/upload-artifact@v4
131132 with :
132133 name : darwin-pt
133134 path : Cloak/release/plugin
134135
135136 Build-Cloak-iOS :
136- runs-on : macos-12
137+ runs-on : macos-13
137138 if : |
138139 contains(github.event.head_commit.message, '[all]') ||
139140 contains(github.event.head_commit.message, '[ios]') ||
@@ -143,27 +144,34 @@ jobs:
143144 steps :
144145
145146 - name : Get Cloak
146- uses : actions/checkout@v3
147+ uses : actions/checkout@v4
147148 with :
148149 repository : amnezia-vpn/Cloak
149150 ref : master-amnezia
150151 path : Cloak
151152
153+ - name : Set up Go
154+ uses : actions/setup-go@v5
155+ with :
156+ go-version : ' 1.21'
157+
152158 - name : ' Run build script'
153159 working-directory : Cloak
154160 run : |
155161 GOOS=ios GOARCH=arm64 GOFLAGS="-tags=ios" CGO_CFLAGS="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -miphoneos-version-min=9.0 -fembed-bitcode -arch arm64" CGO_CXXFLAGS="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -miphoneos-version-min=9.0 -fembed-bitcode -arch arm64" CGO_LDFLAGS="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -miphoneos-version-min=9.0 -fembed-bitcode -arch arm64" CGO_ENABLED=1 go build -buildmode=c-archive -o ck-ovpn-plugin.a ./cmd/ck-ovpn-plugin
156162
157163 - name : Archive iOS client binary
158- uses : actions/upload-artifact@v3
164+ uses : actions/upload-artifact@v4
159165 with :
160166 retention-days : 1
161167 name : ck-ios-plugin
162168 path : ' ~/work/3rd-build-ga/3rd-build-ga/Cloak/ck-ovpn-plugin*'
163169
164170 github-release :
165171 name : GitHub Release
166- needs : Build-Cloak
172+ needs :
173+ - Build-Cloak-iOS
174+ - Build-Cloak-MacOS
167175 runs-on : ubuntu-latest
168176 if : startsWith(github.ref, 'refs/tags/')
169177
0 commit comments