chore: attempt 1 at ensuring x64 mac release gets correct meilisearch arch

This commit is contained in:
Christian Benincasa
2025-12-15 16:32:32 -05:00
parent c13e530563
commit 69fb6acfc3
4 changed files with 21 additions and 15 deletions

View File

@@ -6,7 +6,7 @@ on:
tags:
- v[0-9]+.[0-9]+.[0-9]+*
schedule:
- cron: '0 13-21/2 * * *' # every 2 hours during US Eastern daytime
- cron: "0 13-21/2 * * *" # every 2 hours during US Eastern daytime
jobs:
typecheck:
@@ -24,7 +24,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 22.13.0
cache: 'pnpm'
cache: "pnpm"
- name: Install dependencies
run: pnpm install
@@ -63,12 +63,12 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 22.13.0
cache: 'pnpm'
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: 'Create env file'
- name: "Create env file"
run: |
touch .env
echo TUNARR_BUILD="$(git rev-parse --short ${{ github.sha }})" >> .env
@@ -126,12 +126,12 @@ jobs:
npm install -g corepack@latest
corepack enable && corepack enable pnpm
pnpm --version
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22.13.0
cache: 'pnpm'
cache: "pnpm"
- name: Install dependencies
shell: bash
@@ -145,7 +145,7 @@ jobs:
p12-file-base64: ${{ secrets.APPLE_CERTIFICATE_P12_BASE64 }}
p12-password: ${{ secrets.APPLE_CERTIFICATE_P12_PASSWORD }}
- name: 'Create env file'
- name: "Create env file"
run: |
touch .env
echo TUNARR_BUILD="$(git rev-parse --short ${{ github.sha }})" >> .env
@@ -174,7 +174,7 @@ jobs:
- name: Bundle web
run: pnpm turbo bundle --filter=@tunarr/web
- name: Build Executable
run: pnpm turbo make-bin -- --target ${{matrix.os.target}}
@@ -184,11 +184,11 @@ jobs:
brew install coreutils
plutil -replace CFBundleShortVersionString -string "$TUNARR_VERSION" macos/Tunarr/Tunarr/Info.plist
plutil -replace CFBundleVersion -string "$TUNARR_VERSION" macos/Tunarr/Tunarr/Info.plist
if [[ "$TUNARR_EDGE_BUILD" == "true" || "$TUNARR_EDGE_BUILD" == "1" ]]; then
scripts/bundle-macos.sh "tunarr-${{ matrix.os.target }}" "${{ matrix.os.arch }}"
scripts/bundle-macos.sh "tunarr-${{ matrix.os.target }}" "${{ matrix.os.arch }}" "${{matrix.os.target}}"
else
scripts/bundle-macos.sh "tunarr-${{ env.TUNARR_VERSION }}-${{ matrix.os.target }}" "${{ matrix.os.arch }}"
scripts/bundle-macos.sh "tunarr-${{ env.TUNARR_VERSION }}-${{ matrix.os.target }}" "${{ matrix.os.arch }}" "${{matrix.os.target}}"
fi
- name: Sign
@@ -223,7 +223,7 @@ jobs:
shell: bash
run: |
mv Tunarr.dmg "${{env.RELEASE_NAME}}.dmg"
- name: Upload Edge Binary
uses: softprops/action-gh-release@v2
with:
@@ -239,4 +239,4 @@ jobs:
with:
files: |
${{ env.RELEASE_NAME }}.dmg
if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, 'refs/tags/')

View File

@@ -19,5 +19,5 @@ cp -R "$REPO_ROOT/macos/Tunarr/build/Release/Tunarr.app" "$APP_NAME"
popd || exit
cp -a "$REPO_ROOT/server/bin/$BINARY_NAME" "$APP_NAME/Contents/MacOS/tunarr-macos"
cp -a $REPO_ROOT/server/bin/meilisearch-macos-* "$APP_NAME/Contents/MacOS/meilisearch"
cp -a "$REPO_ROOT/server/bin/meilisearch-$3" "$APP_NAME/Contents/MacOS/meilisearch"
chmod +x "$APP_NAME/Contents/MacOS/tunarr-macos" "$APP_NAME/Contents/MacOS/meilisearch"

View File

@@ -187,6 +187,9 @@ export async function grabMeilisearch(
if (targetPath) {
await copyToTarget(targetPath);
console.log(
'Successfully copied meilisearch to configured target: ' + targetPath,
);
return targetPath;
}

View File

@@ -142,6 +142,9 @@ for (const arch of args.target) {
throw new Error(`Unrecognized osString ${osString}`);
});
console.log(
`Downloading meilisearch (platform ${nodePlatform}, arch ${archString})`,
);
const meilisearchBinaryPath = await grabMeilisearch(
nodePlatform,
archString,