Update ci.yml #96
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
name: RGB.NET-CI | |
on: | |
push: | |
branches: [ Development ] | |
paths: | |
- '**.cs' | |
- '**.csproj' | |
- '**.yml' | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
8.0.x | |
7.0.x | |
6.0.x | |
- name: Git Semantic Version | |
id: versioning | |
uses: PaulHatch/[email protected] | |
with: | |
tag_prefix: "v" | |
version_from_branch: false | |
version_format: "${major}.${minor}.${patch}-prerelease.${increment}" | |
debug: true | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore --configuration Release /p:Version=${{ steps.versioning.outputs.version }} | |
- name: Test | |
run: dotnet test --no-build --verbosity normal --configuration Release | |
- name: Upload a Build Artifact NET6 | |
uses: actions/[email protected] | |
with: | |
name: RGB.NET-NET6 | |
path: bin/net6.0/RGB.NET.*.dll | |
if-no-files-found: error | |
- name: Upload a Build Artifact NET7 | |
uses: actions/[email protected] | |
with: | |
name: RGB.NET-NET7 | |
path: bin/net7.0/RGB.NET.*.dll | |
if-no-files-found: error | |
- name: Upload a Build Artifact NET8 | |
uses: actions/[email protected] | |
with: | |
name: RGB.NET-NET8 | |
path: bin/net8.0/RGB.NET.*.dll | |
if-no-files-found: error | |
- name: Upload Nuget Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: RGB.NET-Nugets | |
path: bin/*nupkg | |
if-no-files-found: error | |
- name: Nuget Push | |
run: dotnet nuget push **\*.nupkg --skip-duplicate --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json | |
- name: Symbols Push | |
run: dotnet nuget push **\*.snupkg --skip-duplicate --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json |