update #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Project | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: ## turn available trigger manually the workflow | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '9.0.x' # Adjust the version as needed | |
cache: true | |
cache-dependency-path: subdir/packages.lock.json | |
# cache-dependency-path: ./**/packages.lock.json ## adding the path where the cache is saved | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build the project | |
run: dotnet build --configuration Release --no-restore |