-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.56 KB
/
PublishNuget.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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'