diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0a48844..e5d0076 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,31 +15,48 @@ jobs: steps: - - uses: actions/checkout@v4 - with: - submodules: true - - - name: Run Build.ps1 - run: > - ./Build/Build.ps1 - -Configuration "${{ env.BuildConfiguration }}" - -Version "${{ env.BuildVersion }}" - -BranchName "${{ github.ref_name }}" - -CoverageBadgeUploadToken "${{ secrets.COVERAGE_BADGE_UPLOAD_TOKEN }}" - - - name: Upload Packages artifacts - uses: actions/upload-artifact@v4 - with: - name: Packages - path: | - Build/Output/*.nupkg - Build/Output/*.zip - - - name: Upload TestOutput artifacts - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: TestOutput - path: | - Build/Output/TestResults/** - Build/Output/TestCoverage/** + - uses: actions/checkout@v4 + with: + submodules: true + + - uses: actions/cache@v4 + with: + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} + restore-keys: | + ${{ runner.os }}-nuget- + + - uses: actions/cache@v4 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: Run Build.ps1 + run: > + ./Build/Build.ps1 + -Configuration "${{ env.BuildConfiguration }}" + -Version "${{ env.BuildVersion }}" + -BranchName "${{ github.ref_name }}" + -CoverageBadgeUploadToken "${{ secrets.COVERAGE_BADGE_UPLOAD_TOKEN }}" + + - name: Upload Packages artifacts + if: ${{ always() }} + uses: actions/upload-artifact@v4 + with: + name: Packages + path: | + Build/Output/*.nupkg + Build/Output/*.zip + + - name: Upload TestOutput artifacts + uses: actions/upload-artifact@v4 + if: ${{ always() }} + with: + name: TestOutput + path: | + Build/Output/TestResults/** + Build/Output/TestCoverage/**