Skip to content

Commit d84c938

Browse files
committed
Revert "fix nuget vcpkg cache integration"
This reverts commit 3c87b64.
1 parent 7464c80 commit d84c938

1 file changed

Lines changed: 14 additions & 22 deletions

File tree

.github/workflows/build-natives.yml

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,12 @@ jobs:
8888
env:
8989
CI: true
9090
VCPKG_ROOT: ${{ github.workspace }}/Natives/NetCord.Natives/vcpkg
91-
FEED_URL: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
92-
VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json,readwrite"
9391
VcpkgOSTarget: ${{ matrix.vcpkg-os-target }}
9492
VcpkgPlatformTarget: ${{ matrix.vcpkg-platform-target }}
93+
FEED_URL: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
94+
VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json,readwrite"
95+
VCPKG_NUGET_REPOSITORY: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
96+
INPUT_TOKEN: ${{ secrets.VCPKG_NUGET_TOKEN }}
9597
Configuration: Release
9698
TargetRID: ${{ matrix.rid }}
9799
DotnetVerbose: ${{ github.event.inputs.MSBuildVerbosity || inputs.MSBuildVerbosity || 'Minimal' }}
@@ -121,31 +123,21 @@ jobs:
121123
if: ${{ !matrix.use-nix }}
122124
run: |
123125
& "$env:VCPKG_ROOT\bootstrap-vcpkg.bat" -disableMetrics
124-
.$(${{ env.VCPKG_ROOT }}/vcpkg fetch nuget) `
125-
sources add `
126-
-Source "${{ env.FEED_URL }}" `
127-
-StorePasswordInClearText `
128-
-Name GitHubPackages `
129-
-UserName "${{ github.repository_owner }}" `
130-
-Password "${{ secrets.VCPKG_NUGET_TOKEN }}"
131-
.$(${{ env.VCPKG_ROOT }}/vcpkg fetch nuget) `
132-
setapikey "${{ secrets.VCPKG_NUGET_TOKEN }}" `
133-
-Source "${{ env.FEED_URL }}"
126+
127+
- name: Configure Github NuGet Vcpkg Cache (Windows)
128+
if: ${{ !matrix.use-nix }}
129+
run: >
130+
dotnet nuget add source "${{ env.FEED_URL }}"
131+
--name "GitHubPackages"
132+
-u "${{ github.repository_owner }}"
133+
-p "${{ secrets.VCPKG_NUGET_TOKEN }}"
134+
--store-password-in-clear-text
135+
--configfile "$env:APPDATA\NuGet\NuGet.Config" || true
134136
135137
- name: Setup vcpkg (Nix)
136138
if: ${{ matrix.use-nix }}
137139
run: |
138140
$VCPKG_ROOT/bootstrap-vcpkg.sh -disableMetrics
139-
mono `${{ env.VCPKG_ROOT }}/vcpkg fetch nuget | tail -n 1` \
140-
sources add \
141-
-Source "${{ env.FEED_URL }}" \
142-
-StorePasswordInClearText \
143-
-Name GitHubPackages \
144-
-UserName "${{ github.repository_owner }}" \
145-
-Password "${{ secrets.VCPKG_NUGET_TOKEN }}"
146-
mono `${{ env.VCPKG_ROOT }}/vcpkg fetch nuget | tail -n 1` \
147-
setapikey "${{ secrets.VCPKG_NUGET_TOKEN }}" \
148-
-Source "${{ env.FEED_URL }}"
149141
150142
- name: Setup .NET Core SDK (Windows)
151143
if: ${{ !matrix.use-nix }}

0 commit comments

Comments
 (0)