From e4d0564eb731b8198fc449bed335bb60e746c227 Mon Sep 17 00:00:00 2001 From: Neko Ayaka Date: Wed, 18 Jun 2025 16:40:02 +0800 Subject: [PATCH] debug(ci): windows not being picked correctly --- .github/workflows/build-tamagotchi.yml | 13 +++++++++---- .github/workflows/release-tamagotchi.yml | 14 ++++++++++---- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-tamagotchi.yml b/.github/workflows/build-tamagotchi.yml index 7804ac485..82d6d125a 100644 --- a/.github/workflows/build-tamagotchi.yml +++ b/.github/workflows/build-tamagotchi.yml @@ -32,10 +32,6 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Get Product Name - run: | - echo "PRODUCT_NAME=$(node -p 'require("./apps/stage-tamagotchi/src-tauri/tauri.conf.json").productName')" >> $GITHUB_ENV - - name: Install pnpm uses: pnpm/action-setup@v4 with: @@ -49,6 +45,15 @@ jobs: # registry-url required. Learn more at # https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages registry-url: https://registry.npmjs.org + - name: Get Product Name (Windows Only) + if: matrix.os == 'windows-latest' + run: | + $productName = node -p 'require("./apps/stage-tamagotchi/src-tauri/tauri.conf.json").productName' + echo "PRODUCT_NAME=$productName" >> $env:GITHUB_ENV + - name: Get Product Name + if: matrix.os != 'windows-latest' + run: | + echo "PRODUCT_NAME=$(node -p 'require("./apps/stage-tamagotchi/src-tauri/tauri.conf.json").productName')" >> $GITHUB_ENV - name: Install Rust Stable uses: dtolnay/rust-toolchain@stable diff --git a/.github/workflows/release-tamagotchi.yml b/.github/workflows/release-tamagotchi.yml index cefd3d689..776b1e420 100644 --- a/.github/workflows/release-tamagotchi.yml +++ b/.github/workflows/release-tamagotchi.yml @@ -29,10 +29,6 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Get Product Name - run: | - echo "PRODUCT_NAME=$(node -p 'require("./apps/stage-tamagotchi/src-tauri/tauri.conf.json").productName')" >> $GITHUB_ENV - - name: Install pnpm uses: pnpm/action-setup@v4 with: @@ -47,6 +43,16 @@ jobs: # https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages registry-url: https://registry.npmjs.org + - name: Get Product Name (Windows Only) + if: matrix.os == 'windows-latest' + run: | + $productName = node -p 'require("./apps/stage-tamagotchi/src-tauri/tauri.conf.json").productName' + echo "PRODUCT_NAME=$productName" >> $env:GITHUB_ENV + - name: Get Product Name + if: matrix.os != 'windows-latest' + run: | + echo "PRODUCT_NAME=$(node -p 'require("./apps/stage-tamagotchi/src-tauri/tauri.conf.json").productName')" >> $GITHUB_ENV + - name: Install Rust Stable uses: dtolnay/rust-toolchain@stable with: