Merge pull request #156 from dotnet-campus/t/lindexi/LoongArch64 #69
Workflow file for this run
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: publish nuget | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: | | |
3.1.x | |
6.0.x | |
8.0.x | |
- name: Install dotnet tool | |
run: dotnet tool install -g dotnetCampus.TagToVersion | |
- name: Set tag to version | |
run: dotnet TagToVersion -t ${{ github.ref }} | |
- name: Build with dotnet | |
run: | | |
dotnet build --configuration Release | |
dotnet pack --configuration Release --no-build | |
- 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 }} |