Skip to content

Commit 25c69be

Browse files
committed
Add publish.yml and release.yml files.
1 parent af27649 commit 25c69be

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

.github/release.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- releasenotes-skip
5+
categories:
6+
- title: Features
7+
labels:
8+
- releasenotes-feature
9+
- title: Bug fixes
10+
labels:
11+
- bug
12+
- releasenotes-bug
13+
- title: Other Changes
14+
labels:
15+
- "*"

.github/workflows/publish.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Publish to NuGet
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
9+
build:
10+
11+
runs-on: windows-latest
12+
defaults:
13+
run:
14+
working-directory: src
15+
16+
env:
17+
BUILD_CONFIG: 'Release'
18+
SOLUTION: 'SenseNet.Preview.sln'
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v3
23+
with:
24+
fetch-depth: 0
25+
26+
# Install the .NET Core workload
27+
- name: Install .NET Core
28+
uses: actions/setup-dotnet@v3
29+
with:
30+
dotnet-version: 6.0.x
31+
32+
- name: Install dependencies
33+
run: dotnet restore ${{env.SOLUTION}}
34+
- name: Build
35+
run: dotnet build ${{env.SOLUTION}} --configuration Release --no-restore
36+
- name: Pack nugets
37+
run: dotnet pack ${{env.SOLUTION}} -c Release --no-build --output .
38+
- name: Push to NuGet
39+
run: dotnet nuget push "*.nupkg" --skip-duplicate --api-key ${{secrets.nuget_api_key}} --source https://api.nuget.org/v3/index.json
40+
41+
42+
43+

0 commit comments

Comments
 (0)