-
Notifications
You must be signed in to change notification settings - Fork 10
40 lines (33 loc) · 1.14 KB
/
release.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
name: Release
on:
push:
tags:
- 'v*'
jobs:
deploy_nuget_packages:
runs-on: windows-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Install NuGet client
uses: warrenbuckley/Setup-Nuget@v1
- name: Add private GitHub registry to NuGet
run: nuget sources add -name "GPR" -Source https://nuget.pkg.github.com/DKE-Data/index.json -Username DKE-Data -Password ${{ secrets.GITHUB_TOKEN }} -StorePasswordInClearText
- name: Build solution and generate NuGet package
run: dotnet pack -c Release -o out
- name: Push generated package to GitHub registry
run: nuget push .\out\*.nupkg -Source "GPR" -SkipDuplicate
create-github-release:
name: Create GitHub Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Create Release
run: gh release create ${{ github.ref }} --generate-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}