Skip to content

Console prototype

Console prototype #359

Workflow file for this run

name: build DicomGrep
on:
push:
branches-ignore:
- 'archive'
paths-ignore:
- 'README.md'
- 'LICENSE'
pull_request:
branches-ignore:
- 'archive'
paths-ignore:
- 'README.md'
- 'LICENSE'
workflow_dispatch:
inputs:
PublishSingleFile_Windows:
description: 'Publish single file for Windows'
required: false
type: boolean
env:
dotnet_version: '8.0.x'
jobs:
build_and_test_debug:
name: 'Build and Test (debug)'
runs-on: windows-latest
env:
configuration: 'Debug'
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.dotnet_version }}
# cache: true
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build DicomGrep/DicomGrep.csproj --no-restore --configuration $env:configuration --output bin/net$env:dotnet_version/$env:configuration
- name: Test
run: dotnet test --no-restore --verbosity normal
- name: Upload articraft
uses: actions/upload-artifact@v4
with:
name: DicomGrep-${{ env.configuration }}-bare
path: |
bin/net${{ env.dotnet_version }}/${{ env.configuration }}
!bin/**/DICOM Dictionary.xml
!bin/**/Private Dictionary.xml
!bin/**/*.pdb
publish_windows_release:
name: 'publish Windows (release)'
runs-on: windows-latest
needs: build_and_test_debug
env:
configuration: 'Release'
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.dotnet_version }}
# cache: true
- name: Install dependencies
run: dotnet restore
- name: Publish
run: dotnet publish DicomGrep/DicomGrep.csproj -c $env:configuration --output bin/publish/net$env:dotnet_version/$env:configuration
- name: Upload articraft
uses: actions/upload-artifact@v4
with:
name: DicomGrep-${{ env.configuration }}-publish
path: |
bin/publish/net${{ env.dotnet_version }}/${{ env.configuration }}
!bin/**/DICOM Dictionary.xml
!bin/**/Private Dictionary.xml
!bin/**/*.pdb
- name: Publish With NET
if: ${{ inputs.PublishSingleFile_Windows }}
run: dotnet publish DicomGrep/DicomGrep.csproj -c $env:configuration -p:PublishSingleFile=true --output bin/publish2/net$env:dotnet_version/$env:configuration
- name: Upload articraft
if: ${{ inputs.PublishSingleFile_Windows }}
uses: actions/upload-artifact@v4
with:
name: DicomGrep-${{ env.configuration }}-publishWithNet${{ env.dotnet_version }}-Windows
path: |
bin/publish2/net${{ env.dotnet_version }}/${{ env.configuration }}
!bin/**/DICOM Dictionary.xml
!bin/**/Private Dictionary.xml
!bin/**/*.pdb