Skip to content

Commit

Permalink
Merge pull request #18 from amnezia-vpn/cloack-macos [cloak]
Browse files Browse the repository at this point in the history
Cloak for macos fat binary ci/cd implemented [cloak]
  • Loading branch information
pokamest authored Feb 7, 2025
2 parents 8ee09bf + 635176a commit 9583a9d
Showing 1 changed file with 37 additions and 69 deletions.
106 changes: 37 additions & 69 deletions .github/workflows/build_cloak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ jobs:
- name: Create Fat Binary (Universal Binary)
working-directory: Cloak
run: |
lipo -create -output ./release/plugin/darwin/ck-ovpn-plugin.a \
lipo -create -output ./release/plugin/darwin/ck-ovpn-plugin-universal2.a \
./release/plugin/darwin/ck-ovpn-plugin-x86_64.a \
./release/plugin/darwin/ck-ovpn-plugin-arm64.a
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: darwin-pt
name: ck-macos-plugin
path: Cloak/release/plugin

Build-Cloak-iOS:
Expand Down Expand Up @@ -169,82 +169,50 @@ jobs:

github-release:
name: GitHub Release
needs: [Build-Cloak-iOS, Build-Cloak-MacOS]
needs: [Build-Cloak, Build-Cloak-iOS, Build-Cloak-MacOS]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')

steps:
- name: Setup | Checkout
uses: actions/checkout@v2

- name: Setup | Artifacts
uses: actions/download-artifact@v2

- name: Setup | Checksums
run: for file in $(find ./ -name '*' ); do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done

- name: Zip ALL
run: for file in *; do zip -r ${file%.*}.zip $file; done

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ck-client-linux.zip
tag: ${{ github.ref }}
overwrite: true
file_glob: true

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ck-client-windows.zip
tag: ${{ github.ref }}
overwrite: true
file_glob: true

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ck-client-darwin.zip
tag: ${{ github.ref }}
overwrite: true
file_glob: true
uses: actions/checkout@v4

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ck-server.zip
tag: ${{ github.ref }}
overwrite: true
file_glob: true
- name: Download all Artifacts
uses: actions/download-artifact@v4

- name: Upload binaries to release
- name: Generate Checksums for Cloak Artifacts
run: |
# List all artifact patterns you expect.
for path in ck-client-linux* ck-client-windows* ck-client-darwin* ck-server* ck-ios-plugin* ck-macos-plugin desktop-plugin; do
if [ -e "$path" ]; then
echo "Processing $path"
if [ -d "$path" ]; then
find "$path" -type f -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \;
else
openssl dgst -sha256 -r "$path" > "$path.sha256"
fi
fi
done
- name: Zip artifacts individually
run: |
for artifact in ck-client-linux ck-client-windows ck-client-darwin ck-server ck-ios-plugin ck-macos-plugin desktop-plugin; do
if [ -d "$artifact" ]; then
echo "Zipping directory $artifact..."
zip -r "${artifact}.zip" "$artifact"
elif [ -f "$artifact" ]; then
echo "Zipping file $artifact..."
zip "${artifact}.zip" "$artifact"
fi
done
- name: List generated ZIP files
run: ls -l *.zip

- name: Upload ZIP archives to GitHub Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ck-ios-plugin.zip
tag: ${{ github.ref }}
overwrite: true
file: "*.zip"
file_glob: true

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: darwin-pt.zip
tag: ${{ github.ref }}
overwrite: true
file_glob: true

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: desktop-plugin.zip
tag: ${{ github.ref }}
overwrite: true
file_glob: true

0 comments on commit 9583a9d

Please sign in to comment.