@@ -36,52 +36,45 @@ jobs:
3636 fetch-depth : 0
3737 lfs : " true"
3838
39- # - name: Setup MSBuild
40- # uses: microsoft/setup-msbuild@v2
41-
42- # - name: Setup NuGet.exe for use with actions
43- # uses: NuGet/setup-nuget@v2.0.0
44-
45- # - name: Print NuGet packages path
46- # run: |
47- # echo "NuGet packages path: $NUGET_PACKAGES"
48- # shell: pwsh
49-
50- # # Cache NuGet packages to speed up build. Hash is based on project files,
51- # # which define the dependencies.
52- # # Note the appending of 0 to the key: You can modify this value to
53- # # invalidate the cache.
54- # - uses: actions/cache@v4
55- # id: nuget-packages
56- # env:
57- # cache-name: nuget-package-cache
58- # with:
59- # path: ${{ env.NUGET_PACKAGES }}
60- # key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
61- # restore-keys: |
62- # ${{ runner.os }}-${{ env.cache-name }}
63-
64- # - name: List NuGet Packages
65- # if: ${{ steps.nuget-packages.outputs.cache-hit == 'true' }}
66- # continue-on-error: true
67- # run: |
68- # echo "Using cached NuGet packages in directory: $NUGET_PACKAGES"
69- # ls $NUGET_PACKAGES
70-
71- # - name: List NuGet Packages
72- # if: ${{ steps.nuget-packages.outputs.cache-hit != 'true' }}
73- # continue-on-error: true
74- # run: echo "Not using cached NuGet packages."
39+ - name : Setup MSBuild
40+ uses : microsoft/setup-msbuild@v2
41+
42+ - name : Setup NuGet.exe for use with actions
43+ uses : NuGet/setup-nuget@v2.0.0
44+
45+ - name : Print NuGet packages path
46+ run : |
47+ echo "NuGet packages path: $NUGET_PACKAGES"
48+ shell : pwsh
7549
76- - uses : actions/setup-dotnet@v4
50+ # Cache NuGet packages to speed up build. Hash is based on project files,
51+ # which define the dependencies.
52+ # Note the appending of 0 to the key: You can modify this value to
53+ # invalidate the cache.
54+ - uses : actions/cache@v4
55+ id : nuget-packages
56+ env :
57+ cache-name : nuget-package-cache
7758 with :
78- dotnet-version : 4.5
79- cache : true
59+ path : ${{ env.NUGET_PACKAGES }}
60+ key : ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
61+ restore-keys : |
62+ ${{ runner.os }}-${{ env.cache-name }}
63+
64+ - name : List NuGet Packages
65+ if : ${{ steps.nuget-packages.outputs.cache-hit == 'true' }}
66+ continue-on-error : true
67+ run : |
68+ echo "Using cached NuGet packages in directory: $NUGET_PACKAGES"
69+ ls $NUGET_PACKAGES
70+
71+ - name : List NuGet Packages
72+ if : ${{ steps.nuget-packages.outputs.cache-hit != 'true' }}
73+ continue-on-error : true
74+ run : echo "Not using cached NuGet packages."
8075
81- # - name: Restore NuGet packages
82- # run: nuget restore AutoTx.sln
83-
84- - run : dotnet restore --locked-mode
76+ - name : Restore NuGet packages
77+ run : nuget restore AutoTx.sln
8578
8679 - name : Build solution
8780 run : .\Scripts\msbuild\build\release.cmd
0 commit comments