Publish Nuget #47
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 crazor | |
uses: actions/checkout@v4 | |
with: | |
path: Crazor | |
- name: Checkout adaptivecards | |
uses: actions/checkout@v4 | |
with: | |
repository: microsoft/adaptivecards | |
path: AdaptiveCards | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
- name: Bump build version | |
id: bump | |
uses: vers-one/dotnet-project-version-updater@v1.5 | |
with: | |
files: "**/libraries/**/Crazor*.csproj" | |
version: bump-build | |
- name: Restore dependencies | |
run: dotnet restore Crazor/source/CrazorLibraries.sln | |
- name: Build | |
run: dotnet build Crazor/source/CrazorLibraries.sln -c Debug --no-restore | |
- name: dotnet pack Crazor | |
run: dotnet pack --no-build ./Crazor/source/CrazorLibraries.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 version changes | |
uses: github-actions-x/commit@v2.9 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: 'Updated package version for published packages' |