-
Notifications
You must be signed in to change notification settings - Fork 4
44 lines (40 loc) · 1.26 KB
/
create-release.yaml
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
name: Create release
on:
workflow_dispatch:
inputs:
release_version:
type: string
required: true
description: Release version
default: '1.0.0'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
2.x
3.x
6.0.x
8.0.x
- name: Run Tests
working-directory: src
run: dotnet test --configuration Release || true
- name: Build projects
run: |
PROJECTS="KissLog KissLog.RestClient KissLog.CloudListeners KissLog.AspNet.Web KissLog.AspNet.Mvc KissLog.AspNet.WebApi KissLog.AspNetCore"
for project in $PROJECTS; do
echo "Building $project..."
dotnet build "src/$project/$project.csproj" --configuration Release /p:Version=${{ github.event.inputs.release_version }}
dotnet pack "src/$project/$project.csproj" --no-build -o . /p:PackageVersion=${{ github.event.inputs.release_version }}
done
- name: Upload nuget package
uses: actions/upload-artifact@v4
with:
path: ./*.nupkg