Skip to content

Merge pull request #3 from dotnet-campus/t/lindexi/CI #3

Merge pull request #3 from dotnet-campus/t/lindexi/CI

Merge pull request #3 from dotnet-campus/t/lindexi/CI #3

name: PublishNuGet
on:
push:
tags:
- '*'
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install dotnet tool
run: dotnet tool install -g dotnetCampus.TagToVersion
- name: Set tag to version
run: dotnet TagToVersion -t ${{ github.ref }}
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Build
run: msbuild /p:Configuration=Release -restore dotnetCampus.UISpy.Uno.sln
- name: Pack
run: dotnet pack --configuration Release --no-build src/dotnetCampus.UISpy.Uno/dotnetCampus.UISpy.Uno.csproj
- name: Install Nuget
uses: nuget/setup-nuget@v1
with:
nuget-version: '6.x'
- name: Add private GitHub registry to NuGet
run: |
nuget sources add -name github -Source https://nuget.pkg.github.com/dotnet-campus/index.json -Username dotnet-campus -Password ${{ secrets.GITHUB_TOKEN }}
- name: Push generated package to GitHub registry
run: |
nuget push .\artifacts\package\release\*.nupkg -Source github -SkipDuplicate
nuget push .\artifacts\package\release\*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NugetKey }}