Skip to content

Migrate from AppVeyor to GitHub Actions #7

Migrate from AppVeyor to GitHub Actions

Migrate from AppVeyor to GitHub Actions #7

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 9.x
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '21'
- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Cache SonarQube
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
- name: Build and Test
run: .\build.cmd sonar unit-test nuget-pack --configuration Release
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Upload NuGet package
uses: actions/upload-artifact@v4
with:
path: artifacts/*.nupkg
compression-level: 0