Skip to content

Update dotnet.yml

Update dotnet.yml #17

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: Continuous Integration
on:
workflow_dispatch:
push:
branches:
- '**'
pull_request:
branches:
- '**'
env:
BUILD_CONFIGURATION: Debug
jobs:
build:
name: Build
runs-on: windows-latest
steps:
- uses: actions/checkout@main
with:
fetch-depth: 0
- name: Setup .NET 6
uses: actions/setup-dotnet@main
with:
dotnet-version: 6.x
- name: Setup .NET 7
uses: actions/setup-dotnet@main
with:
dotnet-version: 7.0.306 # TEMP FIX: SDK 7.0.400 broke the Android builds
- name: Setup .NET workload Android
run: dotnet workload install android
- name: Setup JDK 17
uses: actions/setup-java@main
with:
java-version: 17
java-package: jdk
distribution: 'zulu'
- name: Setup MSBuild
uses: microsoft/setup-msbuild@main
with:
msbuild-architecture: x64
- name: Restore
run: dotnet restore src/PDFtoImage.sln
- name: Build
run: msbuild src/PDFtoImage.sln /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:VersionSuffix=ci /p:RestorePackages=false
- name: Pack
run: dotnet pack src/PDFtoImage.sln --no-restore --no-build --configuration ${{env.BUILD_CONFIGURATION}} --output NuGet /p:VersionSuffix=ci
- name: Publish libraries
uses: actions/upload-artifact@main
with:
name: Library assemblies
path: PDFtoImage/src/PDFtoImage/bin/${{env.BUILD_CONFIGURATION}}
if-no-files-found: error
- name: Publish tests
uses: actions/upload-artifact@main
with:
name: Test assemblies
path: PDFtoImage/src/Tests/bin/${{env.BUILD_CONFIGURATION}}
if-no-files-found: error
- name: Publish NuGet packages
uses: actions/upload-artifact@main
with:
name: NuGet packages
path: PDFtoImage/src/PDFtoImage/bin/${{env.BUILD_CONFIGURATION}}/NuGet
if-no-files-found: error