diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index dd354463a..22bf66609 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -326,7 +326,7 @@ jobs: PLATFORM: ${{ matrix.os }}/${{ matrix.arch }} - uses: actions/upload-artifact@v4 with: - name: dist-${{ matrix.os }}-${{ matrix.arch }} + name: dist-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.target }} path: | dist/*.tgz @@ -391,9 +391,6 @@ jobs: GH_TOKEN: ${{ github.token }} steps: - uses: actions/checkout@v4 - - name: Set Version - shell: bash - run: | - uses: actions/download-artifact@v4 with: name: dist-darwin @@ -406,11 +403,9 @@ jobs: with: pattern: dist-linux-* path: dist - - run: | - ls -lh dist/ - (cd dist; find . -type f | xargs sha256sum > ../sha256sum.txt) - mv sha256sum.txt dist/ - cat dist/sha256sum.txt + merge-multiple: true + - run: find . -type f -not -name 'sha256sum.txt' | xargs sha256sum | tee sha256sum.txt + working-directory: dist - name: Create or update Release run: | RELEASE_VERSION=$(echo ${GITHUB_REF_NAME} | cut -f1 -d-)" diff --git a/scripts/build_darwin.sh b/scripts/build_darwin.sh index 0beb765ea..baba3c1fd 100755 --- a/scripts/build_darwin.sh +++ b/scripts/build_darwin.sh @@ -34,7 +34,8 @@ _build_darwin() { -DCMAKE_OSX_ARCHITECTURES=x86_64 \ -DCMAKE_OSX_DEPLOYMENT_TARGET=11.3 cmake --build build/darwin-$ARCH --target ggml-cpu -j - install build/darwin-$ARCH/lib/ollama/*.{dylib,so} $INSTALL_PREFIX + install -d $INSTALL_PREFIX/lib/ollama + install build/darwin-$ARCH/lib/ollama/*.{dylib,so} $INSTALL_PREFIX/lib/ollama fi done } @@ -43,6 +44,7 @@ _sign_darwin() { status "Creating universal binary..." mkdir -p dist/darwin lipo -create -output dist/darwin/ollama dist/darwin-*/ollama + chmod +x dist/darwin/ollama if [ -n "$APPLE_IDENTITY" ]; then for F in dist/darwin/ollama dist/darwin-amd64/lib/ollama/*; do