Skip to content

Publish Nuget

Publish Nuget #1

Workflow file for this run

name: Publish Nuget
on:
workflow_dispatch:
# push:
# branches:
# - main
# paths:
# - source/libraries/**
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: Crazor
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Bump build version
id: bump
uses: vers-one/[email protected]
with:
files: |
"**/libraries/**/YamlConvert.csproj"
version: bump-build
- name: Restore dependencies
run: dotnet restore YamlConvert/YamlConvert.sln
- name: Build
run: dotnet build YamlConvert/YamlConvert.sln -c Release --no-restore
- name: dotnet pack
run: |
dotnet pack --no-build ./YamlConvert/YamlConvert.sln -c Debug -o packages --include-symbols --property WarningLevel=0
- name: Publish NuGet and symbols
id: nuget-push
uses: edumserrano/nuget-push@v1
with:
api-key: '${{ secrets.NUGET_KEY }}'
working-directory: 'packages'
fail-if-exists: false
- name: Commit new version changes
working-directory: ./YamlConvert
run: |
git config --global user.name "Github Action"
git config --global user.email "[email protected]"
git commit -a -m "Bumped version for published nuget artifacts"
git push