Skip to content

Commit

Permalink
Create dotnet.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sungaila authored Aug 24, 2023
1 parent 7d8538e commit 28a9980
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# 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.x
- 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: Restore
run: dotnet restore
- name: Build
run: dotnet msbuild --no-restore --configuration ${{env.BUILD_CONFIGURATION}} /p:VersionSuffix=ci
- name: Package
run: dotnet pack --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

0 comments on commit 28a9980

Please sign in to comment.