Skip to content

Commit

Permalink
Caching nuget.
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinJump committed Feb 19, 2024
1 parent 20e5c67 commit c75b594
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/dotnet-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.0.x"
dotnet-version: "8.x"

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.7
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Restore npm
uses: actions/setup-node@v3
with:
node-version: 20
node-version: '20.x'
cache: 'npm'
- run: npm install

Expand All @@ -60,7 +60,15 @@ jobs:
# ------------------------
# actual builds / packages
# ------------------------
- name: Restore

- uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashfiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget
- name: Restore Dependencies
run: dotnet restore ./uSync/uSync.csproj

- name: tests
Expand Down Expand Up @@ -88,7 +96,7 @@ jobs:
run: dotnet pack ./uSync.BackOffice.Management.Client/uSync.BackOffice.Management.Client.csproj --no-restore -c ${{env.CONFIG}} --output ${{env.OUT_FOLDER}} /p:version=${{steps.gitversion.outputs.fullSemVer}}

- name: Build uSync.BackOfficeTargets
run: dotnet pack ./uSync.BackOffice.Targets/uSync.BackOffice.Targets.csproj --no-restore -c ${{env.CONFIG}} --output ${{env.OUT_FOLDER}} /p:version=${{steps.gitversion.outputs.fullSemVer}}
run: dotnet pack ./uSync.BackOffice.Targets/uSync.BackOffice.Targets.csproj -c ${{env.CONFIG}} --output ${{env.OUT_FOLDER}} /p:version=${{steps.gitversion.outputs.fullSemVer}}

- name: Build uSync
run: dotnet pack ./uSync/uSync.csproj --no-restore -c ${{env.CONFIG}} --output ${{env.OUT_FOLDER}} /p:version=${{steps.gitversion.outputs.fullSemVer}}
Expand Down

0 comments on commit c75b594

Please sign in to comment.