From 3d542743ae4f12d75799150ae3c1c009a3509078 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Mon, 12 Feb 2024 20:43:00 +0100 Subject: [PATCH] bash --- .github/workflows/macos.yml | 9 ++++----- .github/workflows/windows.yml | 17 +++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 02dd056..c770083 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -46,15 +46,14 @@ jobs: fetch-depth: 1 - name: 🐾 Bootstrap vcpkg - shell: powershell run: | PKG_SOURCE_USER=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 1) ./vcpkg/bootstrap-vcpkg.sh - .$(./vcpkg/vcpkg fetch nuget) sources add -Name ghpkg -Source "https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json" -UserName "$PKG_SOURCE_USER" -Password "${{ secrets.GITHUB_TOKEN }}" -StorePasswordInClearText - .$(./vcpkg/vcpkg fetch nuget) setapikey "${{ secrets.GITHUB_TOKEN }}" -Source "https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json" + $(./vcpkg/vcpkg fetch nuget) sources add -Name ghpkg -Source "https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json" -UserName "$PKG_SOURCE_USER" -Password "${{ secrets.GITHUB_TOKEN }}" -StorePasswordInClearText + $(./vcpkg/vcpkg fetch nuget) setapikey "${{ secrets.GITHUB_TOKEN }}" -Source "https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json" echo "VCPKG_BINARY_SOURCES=clear;nuget,https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json,readwrite" >> $GITHUB_ENV - echo "PATH=$env:VCPKG_ROOT;$env:PATH" >> $GITHUB_ENV - echo "VCPKG_ROOT=$env:VCPKG_ROOT" >> $GITHUB_ENV + echo "PATH=$VCPKG_ROOT;$PATH" >> $GITHUB_ENV + echo "VCPKG_ROOT=$VCPKG_ROOT" >> $GITHUB_ENV - name: 🌋 Build run: | diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 4960c09..d7bffba 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -41,15 +41,16 @@ jobs: fetch-depth: 1 - name: 🐾 Bootstrap vcpkg - shell: powershell run: | - $PKG_SOURCE_USER = $env:GITHUB_REPOSITORY -split '/' | Select-Object -First 1 - .\vcpkg\bootstrap-vcpkg.bat - .$(.\vcpkg\vcpkg.exe fetch nuget) sources add -Name ghpkg -Source "https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json" -UserName "$PKG_SOURCE_USER" -Password "${{ secrets.GITHUB_TOKEN }}" -StorePasswordInClearText - .$(.\vcpkg\vcpkg.exe fetch nuget) setapikey "${{ secrets.GITHUB_TOKEN }}" -Source "https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json" - echo "VCPKG_BINARY_SOURCES=clear;nuget,https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json,readwrite" >> $env:GITHUB_ENV - echo "PATH=$env:VCPKG_ROOT;$env:PATH" >> $env:GITHUB_ENV - echo "VCPKG_ROOT=$env:VCPKG_ROOT" >> $env:GITHUB_ENV + PKG_SOURCE_USER=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 1) + ./vcpkg/bootstrap-vcpkg.sh + NUGET_EXE=$(./vcpkg/vcpkg fetch nuget) + echo "Downloaded $NUGET_EXE" + $NUGET_EXE sources add -Name ghpkg -Source "https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json" -UserName "$PKG_SOURCE_USER" -Password "${{ secrets.GITHUB_TOKEN }}" -StorePasswordInClearText + $NUGET_EXE setapikey "${{ secrets.GITHUB_TOKEN }}" -Source "https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json" + echo "VCPKG_BINARY_SOURCES=clear;nuget,https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json,readwrite" >> $GITHUB_ENV + echo "PATH=$VCPKG_ROOT;$PATH" >> $GITHUB_ENV + echo "VCPKG_ROOT=$VCPKG_ROOT" >> $GITHUB_ENV - name: 🌋 Build run: |