-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (32 loc) · 1.04 KB
/
publish-dotnet.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
name: publish-dotnet
on:
push:
tags:
- v*.*.*
- v*.*.*-rc.*
jobs:
publish:
permissions:
packages: write
contents: write
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup dotnet build
uses: actions/setup-dotnet@v3
with:
cache: true
source-url: https://nuget.pkg.github.com/KodyPay/index.json
cache-dependency-path: dotnet\packages.lock.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create dotnet package
if: |
startsWith(github.ref, 'refs/tags/v') &&
(!contains(github.ref, '-rc.'))
run: dotnet pack --configuration Release -p:PackageVersion=$(echo ${{ github.ref_name }} | sed 's/^v//') dotnet
- name: Publish dotnet package to GPR
if: |
startsWith(github.ref, 'refs/tags/v') &&
(!contains(github.ref, '-rc.'))
run: dotnet nuget push --api-key ${{ secrets.GITHUB_TOKEN }} dotnet\bin\Release\kp-protocols-clientsdk.*.nupkg