mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-19 06:30:07 +08:00
wip: macOS build
This commit is contained in:
parent
2e991b675d
commit
c779ffc528
31
.github/workflows/build-qv2ray-cmake.yml
vendored
31
.github/workflows/build-qv2ray-cmake.yml
vendored
@ -53,7 +53,8 @@ jobs:
|
||||
runs-on: ${{ matrix.platform }}
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
||||
|
||||
needs:
|
||||
- build-go
|
||||
steps:
|
||||
- name: Checking out sources
|
||||
uses: actions/checkout@v2
|
||||
@ -66,6 +67,11 @@ jobs:
|
||||
# 14.1 is for vs2017, 14.2 is vs2019, following the upstream vcpkg build from Qv2ray-deps repo
|
||||
toolset: 14.2
|
||||
arch: ${{ matrix.arch }}
|
||||
- name: Download Artifacts
|
||||
if: matrix.platform == 'macos-11'
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
path: download-artifact
|
||||
- name: Cache Qt
|
||||
id: cache-qt
|
||||
uses: actions/cache@v3
|
||||
@ -140,7 +146,6 @@ jobs:
|
||||
path: artifacts.tgz
|
||||
publish:
|
||||
name: Publish Release
|
||||
if: github.event.inputs.publish != 'y'
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- build-cpp
|
||||
@ -148,11 +153,11 @@ jobs:
|
||||
steps:
|
||||
- name: Checking out sources
|
||||
uses: actions/checkout@v2
|
||||
- name: Donwload Artifacts
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
path: download-artifact
|
||||
- name: Release
|
||||
- name: Pack
|
||||
run: |
|
||||
source libs/deploy_common.sh
|
||||
curl -Lo - https://github.com/tcnksm/ghr/releases/download/v0.13.0/ghr_v0.13.0_linux_amd64.tar.gz | tar xzv
|
||||
@ -161,7 +166,6 @@ jobs:
|
||||
cd deployment
|
||||
cp -r assets/* linux64
|
||||
cp -r assets/* windows64
|
||||
cp -r assets/* macos-amd64
|
||||
rm -rf assets *.pdb
|
||||
####
|
||||
mv linux64 nekoray
|
||||
@ -172,9 +176,14 @@ jobs:
|
||||
zip -r $version_standalone-windows64.zip nekoray
|
||||
rm -rf nekoray
|
||||
####
|
||||
mv macos-amd64 nekoray
|
||||
zip -r $version_standalone-macos-amd64.zip nekoray
|
||||
rm -rf nekoray
|
||||
####
|
||||
cd ..
|
||||
./ghr -delete -t "${{ github.token }}" -n "${{ github.event.inputs.tag }}" "${{ github.event.inputs.tag }}" deployment
|
||||
mv macos-amd64/nekoray.dmg $version_standalone-macos-amd64.dmg
|
||||
rm -rf macos-amd64
|
||||
- name: Uploading Artifact
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: Deployment-${{ github.sha }}
|
||||
path: deployment
|
||||
- name: Release
|
||||
if: github.event.inputs.publish != 'y'
|
||||
run: |
|
||||
./ghr -delete -t "${{ github.token }}" -n "${{ github.event.inputs.tag }}" "${{ github.event.inputs.tag }}" deployment
|
||||
|
||||
@ -4,8 +4,8 @@ set -e
|
||||
source libs/deploy_common.sh
|
||||
[ "$GOOS" == "windows" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/windows64 || true
|
||||
[ "$GOOS" == "linux" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/linux64 || true
|
||||
[ "$GOOS" == "darwin" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/mac-amd64 || true
|
||||
[ "$GOOS" == "darwin" ] && [ "$GOARCH" == "arm64" ] && DEST=$DEPLOYMENT/mac-arm64 || true
|
||||
[ "$GOOS" == "darwin" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/macos-amd64 || true
|
||||
[ "$GOOS" == "darwin" ] && [ "$GOARCH" == "arm64" ] && DEST=$DEPLOYMENT/macos-arm64 || true
|
||||
if [ -z $DEST ]; then
|
||||
echo "Please set GOOS GOARCH"
|
||||
exit 1
|
||||
|
||||
@ -12,6 +12,13 @@ DEST=$DEPLOYMENT/macos-$ARCH
|
||||
rm -rf $DEST
|
||||
mkdir -p $DEST
|
||||
|
||||
#### copy golang & asset => .app ####
|
||||
pushd download-artifact
|
||||
find . -name artifacts.tgz | xargs -n1 tar xvzf
|
||||
mv deployment/assets/* deployment/macos-$ARCH
|
||||
mv deployment/macos-$ARCH/* $BUILD/nekoray.app/Contents/MacOS
|
||||
popd
|
||||
|
||||
#### deploy qt & DLL runtime => dmg ####
|
||||
pushd $BUILD
|
||||
macdeployqt nekoray.app -dmg -verbose=3
|
||||
|
||||
@ -1 +1 @@
|
||||
803c7ea316fdc9d953ea62a2459e2221e0ed0911
|
||||
46ba6137206cb0e0fc3433b3459237c55132aabe
|
||||
|
||||
Loading…
Reference in New Issue
Block a user