diff --git a/.github/workflows/build-qv2ray-cmake.yml b/.github/workflows/build-qv2ray-cmake.yml index 944fcc9..c655893 100644 --- a/.github/workflows/build-qv2ray-cmake.yml +++ b/.github/workflows/build-qv2ray-cmake.yml @@ -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 \ No newline at end of file + 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 diff --git a/libs/build_go.sh b/libs/build_go.sh index 47aa8b8..90fb9f5 100755 --- a/libs/build_go.sh +++ b/libs/build_go.sh @@ -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 diff --git a/libs/deploy_macos.sh b/libs/deploy_macos.sh index 5c84010..3a3f135 100755 --- a/libs/deploy_macos.sh +++ b/libs/deploy_macos.sh @@ -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 diff --git a/matsuri_commit.txt b/matsuri_commit.txt index c20230a..d0b8a08 100644 --- a/matsuri_commit.txt +++ b/matsuri_commit.txt @@ -1 +1 @@ -803c7ea316fdc9d953ea62a2459e2221e0ed0911 +46ba6137206cb0e0fc3433b3459237c55132aabe