|
name: Compile solution |
|
|
|
on: |
|
push: |
|
branches: |
|
- '*' |
|
tags-ignore: |
|
- '*' |
|
pull_request: |
|
workflow_dispatch: |
|
|
|
concurrency: |
|
group: compile-${{ github.ref }} |
|
cancel-in-progress: true |
|
|
|
jobs: |
|
windows: |
|
name: windows-2025 |
|
runs-on: windows-2025 |
|
steps: |
|
|
|
- name: Checkout |
|
uses: actions/checkout@v6 |
|
with: |
|
fetch-depth: 0 |
|
submodules: recursive |
|
|
|
- name: Cache packages |
|
uses: actions/cache@v5 |
|
with: |
|
path: ~/.nuget/packages |
|
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', 'Directory.Build.props', 'Directory.Packages.props') }} |
|
restore-keys: ${{ runner.os }}-nuget- |
|
|
|
- name: Inject Daemon config |
|
shell: pwsh |
|
run: | |
|
$file = "source/DevTools.Daemon/appsettings.json" |
|
$json = Get-Content $file | ConvertFrom-Json |
|
$json.Auth.Issuer = "${{ secrets.AUTH_ISSUER }}" |
|
$json.Auth.ClientId = "${{ secrets.AUTH_CLIENT_ID }}" |
|
$json.Gateway.Url = "${{ secrets.GATEWAY_URL }}" |
|
$json | ConvertTo-Json -Depth 10 | Set-Content $file |
|
|
|
- name: Compile solution |
|
run: dotnet run -c Release pack |
|
working-directory: "build" |
|
env: |
|
DOTNET_ENVIRONMENT: ${{ github.ref_name == 'main' && 'Production' || 'Development' }} |
|
|
|
- name: Upload artifacts |
|
uses: actions/upload-artifact@v4 |
|
with: |
|
name: build-output |
|
path: | |
|
output/*.zip |
|
output/*.exe |
|
if-no-files-found: warn |
|
retention-days: 7 |