diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index bc1797d5c..fd211f00b 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -18,8 +18,16 @@ runs: cache: 'yarn' registry-url: 'https://npm.pkg.github.com' - - name: Setup yarn + - name: Setup yarn (Unix) + if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }} run: chmod +x ${{ github.workspace }}/yarn.sh && ${{ github.workspace }}/yarn.sh shell: bash env: NPM_AUTH_TOKEN: ${{ inputs.npm-auth-token }} + + - name: Setup yarn (Windows) + if: ${{ runner.os == 'Windows' }} + run: powershell -Command Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process; ${{ github.workspace }}/yarn.ps1 + shell: pwsh + env: + NPM_AUTH_TOKEN: ${{ inputs.npm-auth-token }} diff --git a/package.json b/package.json index 5eae9c767..64192e66c 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "prepare": "is-ci || husky install", "update:sdk": "yarn up @plentymarkets/shop-api", "setup:unix": "chmod +x yarn.sh && ./yarn.sh && yarn build", - "setup:windows": "powershell -Command \"Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process; ./yarn.ps1\" && yarn build", + "setup:windows": "powershell -Command Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process; ./yarn.ps1 && yarn build", "turbo:disable-telemetry": "turbo telemetry disable", "build": "yarn turbo:disable-telemetry && turbo run build", "build:analyze": "yarn turbo:disable-telemetry && turbo run build:analyze", diff --git a/yarn.ps1 b/yarn.ps1 index 59718de76..49879a972 100644 --- a/yarn.ps1 +++ b/yarn.ps1 @@ -47,7 +47,7 @@ yarn set version stable yarn set version 4.5.3 --yarn-path yarn config set nodeLinker node-modules yarn config set npmScopes.plentymarkets.npmRegistryServer "https://npm.pkg.github.com" -yarn config set npmScopes.plentymarkets.npmAlwaysAuth $true +yarn config set npmScopes.plentymarkets.npmAlwaysAuth true if ($env:GITHUB_ACTIONS) { if (-not $env:NPM_AUTH_TOKEN) {