Move from Azure DevOps to GitHub Actions #20
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: msbuild src/PDFtoImage/PDFtoImage.csproj /t:pack /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:VersionSuffix=ci /p:RestorePackages=false /p:OutputDir=NuGet | |
- 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 |