-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (29 loc) · 1.03 KB
/
workflow.yml
File metadata and controls
30 lines (29 loc) · 1.03 KB
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
name: SerializerSharp Publish Nuget
# [push] git push [create] git push <tag>
#on: [create]
on:
create:
tags:
- 'v*'
branches:
- master
- release/*
jobs:
publish:
name: Publish Project to Nuget
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.1.403 # SDK Version to use.
- name: Build add Packing
run: |
version=`echo $(git describe --tags) |sed "s/^[v]\{1,\}//g"` # Filter out prefix 'v'
dotnet build SerializerSharp --configuration release -p:PackageVersion=$version
echo "::set-env name=PKGPATH::$(find /home/runner/work/SerializerSharp/SerializerSharp/SerializerSharp/bin/ -name "*.nupkg")" # https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
- name: Publish to nuget.org
run: dotnet nuget push ${PKGPATH} -k ${APIKEY} -s https://api.nuget.org/v3/index.json
env:
APIKEY: ${{ secrets.APPKEY }}