Skip to content

build

build #48

Workflow file for this run

name: build
on:
push:
branches: [main]
tags: # match semver: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
- "[0-9]+.[0-9]+.[0-9]+"
paths: ["!docs/**"]
pull_request:
branches: [main]
paths: ["!docs/**"]
#--- TODO: For now also enable manual runs
workflow_dispatch:
jobs:
build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
with:
fetch-depth: "0" # Use all history for gitversion, cf.: https://github.com/actions/checkout/issues/113
- uses: actions/setup-java@v2 # Setup Java 11 for Sonar
with:
distribution: "temurin" # https://github.com/actions/setup-java#supported-distributions
java-version: "11" # https://docs.sonarqube.org/latest/requirements/requirements/
# Setup all needed dotnet sdks, cf.:
# - https://itnext.io/how-to-support-multiple-net-sdks-in-github-actions-workflows-b988daa884e
# - https://github.com/actions/setup-dotnet
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
- run: .\build.ps1 CiBuild
env:
SONAR_LOGIN: "${{ secrets.SONAR_LOGIN }}"
NUGET_API_KEY: "${{ secrets.NUGET_API_KEY }}"
# Use Java 11 for Sonar Scanner, Pre-installed on windows-latest
# cf.: https://github.com/actions/virtual-environments/blob/main/images/win/Windows2022-Readme.md#java
#JAVA_HOME: "${{ env.JAVA_HOME_11_X64 }}"