-
Notifications
You must be signed in to change notification settings - Fork 24
69 lines (65 loc) · 2.15 KB
/
dotnet.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# 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