Skip to content

.NET Core Desktop Build #17

.NET Core Desktop Build

.NET Core Desktop Build #17

Workflow file for this run

name: .NET Core Desktop Build
env:
NUGET_SERVER_URL: "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
NUGET_CONFIG: "../NuGet.config"
GH_TOKEN: ${{ secrets.LATENCY_PAT }}
on:
push:
branches: master
pull_request:
workflow_dispatch:
jobs:
build:
if: ${{ startsWith(github.ref, 'refs/tags/') == false }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [self-hosted] #, ubuntu-latest, windows-latest]
BuildConfiguration: [ Release ]
max-parallel: 2
steps:
- name: Copy NuGet.Config Template
shell: bash
run: |
cp ../NuGet.Config.template ../NuGet.Config
- name: Update NuGet Config
shell: bash
run: |
nuget config -Set defaultPushSource="${{ env.NUGET_SERVER_URL }}" -ConfigFile ${{ env.NUGET_CONFIG }}
dotnet nuget add source --username ${{ github.repository_owner }} --password ${{ secrets.NUGET_AUTH_TOKEN }} --protocol-version 3 --configfile ${{ env.NUGET_CONFIG }} --store-password-in-clear-text --name github "${{ env.NUGET_SERVER_URL }}"
- uses: actions/checkout@v4.1.1
with:
fetch-depth: '0'
- uses: actions/setup-dotnet@v4.0.0
if: matrix.os != 'self-hosted'
with:
dotnet-version: '8.0.x'
dotnet-quality: 'signed'
source-url: ${{ env.NUGET_SERVER_URL }}
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_AUTH_TOKEN }}
- name: Restore dependencies
run: dotnet restore
- name: Build
id: build
run: |
dotnet build --no-restore --configuration ${{ matrix.BuildConfiguration }}