Publish Nuget #3
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: | |
workflow_dispatch: | |
# push: | |
# branches: | |
# - main | |
# paths: | |
# - source/libraries/** | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: YamlConvert | |
- 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 Release -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 |