@@ -130,7 +130,7 @@ jobs:
130130 - name : Archive artifacts
131131 uses : actions/upload-artifact@v4
132132 with :
133- name : darwin-pt
133+ name : ck-macos-plugin
134134 path : Cloak/release/plugin
135135
136136 Build-Cloak-iOS :
@@ -169,82 +169,50 @@ jobs:
169169
170170 github-release :
171171 name : GitHub Release
172- needs : [Build-Cloak-iOS, Build-Cloak-MacOS]
172+ needs : [Build-Cloak, Build-Cloak -iOS, Build-Cloak-MacOS]
173173 runs-on : ubuntu-latest
174174 if : startsWith(github.ref, 'refs/tags/')
175-
176175 steps :
177176 - name : Setup | Checkout
178- uses : actions/checkout@v2
179-
180- - name : Setup | Artifacts
181- uses : actions/download-artifact@v2
182-
183- - name : Setup | Checksums
184- run : for file in $(find ./ -name '*' ); do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done
185-
186- - name : Zip ALL
187- run : for file in *; do zip -r ${file%.*}.zip $file; done
188-
189- - name : Upload binaries to release
190- uses : svenstaro/upload-release-action@v2
191- with :
192- repo_token : ${{ secrets.GITHUB_TOKEN }}
193- file : ck-client-linux.zip
194- tag : ${{ github.ref }}
195- overwrite : true
196- file_glob : true
197-
198- - name : Upload binaries to release
199- uses : svenstaro/upload-release-action@v2
200- with :
201- repo_token : ${{ secrets.GITHUB_TOKEN }}
202- file : ck-client-windows.zip
203- tag : ${{ github.ref }}
204- overwrite : true
205- file_glob : true
206-
207- - name : Upload binaries to release
208- uses : svenstaro/upload-release-action@v2
209- with :
210- repo_token : ${{ secrets.GITHUB_TOKEN }}
211- file : ck-client-darwin.zip
212- tag : ${{ github.ref }}
213- overwrite : true
214- file_glob : true
177+ uses : actions/checkout@v4
215178
216- - name : Upload binaries to release
217- uses : svenstaro/upload-release-action@v2
218- with :
219- repo_token : ${{ secrets.GITHUB_TOKEN }}
220- file : ck-server.zip
221- tag : ${{ github.ref }}
222- overwrite : true
223- file_glob : true
179+ - name : Download all Artifacts
180+ uses : actions/download-artifact@v4
224181
225- - name : Upload binaries to release
182+ - name : Generate Checksums for Cloak Artifacts
183+ run : |
184+ # List all artifact patterns you expect.
185+ for path in ck-client-linux* ck-client-windows* ck-client-darwin* ck-server* ck-ios-plugin* ck-macos-plugin desktop-plugin; do
186+ if [ -e "$path" ]; then
187+ echo "Processing $path"
188+ if [ -d "$path" ]; then
189+ find "$path" -type f -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \;
190+ else
191+ openssl dgst -sha256 -r "$path" > "$path.sha256"
192+ fi
193+ fi
194+ done
195+
196+ - name : Zip artifacts individually
197+ run : |
198+ for artifact in ck-client-linux ck-client-windows ck-client-darwin ck-server ck-ios-plugin ck-macos-plugin desktop-plugin; do
199+ if [ -d "$artifact" ]; then
200+ echo "Zipping directory $artifact..."
201+ zip -r "${artifact}.zip" "$artifact"
202+ elif [ -f "$artifact" ]; then
203+ echo "Zipping file $artifact..."
204+ zip "${artifact}.zip" "$artifact"
205+ fi
206+ done
207+
208+ - name : List generated ZIP files
209+ run : ls -l *.zip
210+
211+ - name : Upload ZIP archives to GitHub Release
226212 uses : svenstaro/upload-release-action@v2
227213 with :
228214 repo_token : ${{ secrets.GITHUB_TOKEN }}
229- file : ck-ios-plugin.zip
230215 tag : ${{ github.ref }}
231216 overwrite : true
217+ file : " *.zip"
232218 file_glob : true
233-
234- - name : Upload binaries to release
235- uses : svenstaro/upload-release-action@v2
236- with :
237- repo_token : ${{ secrets.GITHUB_TOKEN }}
238- file : darwin-pt.zip
239- tag : ${{ github.ref }}
240- overwrite : true
241- file_glob : true
242-
243- - name : Upload binaries to release
244- uses : svenstaro/upload-release-action@v2
245- with :
246- repo_token : ${{ secrets.GITHUB_TOKEN }}
247- file : desktop-plugin.zip
248- tag : ${{ github.ref }}
249- overwrite : true
250- file_glob : true
0 commit comments