Fixed yml file publishing. #27
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: Update NuGet | |
on: | |
push: | |
branches: | |
- "main" | |
jobs: | |
build: | |
env: | |
BUILD_CONFIG: 'Release' | |
OUT_FOLDER: './out' | |
NUGET_TOKEN: ${{ secrets.NUGET_BLEND_SITEMAP_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
dotnet-versions: ['8.0'] | |
name: Update_NuGet | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET Core SDK ${{matrix.dotnet-versions}} | |
uses: actions/[email protected] | |
with: | |
dotnet-version: ${{matrix.dotnet-versions}} | |
- name: Setup NuGet.exe | |
uses: nuget/setup-nuget@v1 | |
with: | |
nuget-version: latest | |
- name: Install gitversion | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
versionSpec: '5.x' | |
- name: Use GitVersion | |
id: gitversion # step id used as reference for output values | |
uses: gittools/actions/gitversion/[email protected] | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build Blend.Sitemap | |
run: dotnet pack .\Blend.Sitemap\Blend.Sitemap.csproj --no-restore -c ${{ env.BUILD_CONFIG }} -o ${{ env.OUT_FOLDER }} /p:ContinuousIntegrationBuild=true,version=${{ env.GitVersion_NuGetVersionV2 }} | |
- name: Publish Nuget to Nuget.org | |
run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey $env:NUGET_TOKEN | |
- name: Release snapshot | |
id: release-snapshot | |
uses: actions/create-release@latest | |
with: | |
tag_name: ${{ env.GitVersion_NuGetVersionV2 }} | |
release_name: ${{ env.GitVersion_NuGetVersionV2 }} | |
draft: false | |
prerelease: false |