name: Build on: push: branches: [main, develop] pull_request: branches: [main, develop] env: DOTNET_VERSION: '10.0.103' jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Setup .NET SDK uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ env.DOTNET_VERSION }} - name: Cache NuGet packages uses: actions/cache@v4 with: path: ~/.nuget/packages key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} restore-keys: | ${{ runner.os }}-nuget- - name: Restore dependencies run: dotnet restore src/Fengling.Console.csproj - name: Build run: dotnet build src/Fengling.Console.csproj --configuration Release --no-restore - name: Publish run: dotnet publish src/Fengling.Console.csproj --configuration Release --no-build -o ./publish