-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (33 loc) · 1.29 KB
/
Copy pathpublish.yml
File metadata and controls
42 lines (33 loc) · 1.29 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
31
32
33
34
35
36
37
38
39
40
41
42
name: Publish to NuGET
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
publish:
name: 'build & Pack & Publish'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Extract version from tag
run: echo "VERSION=$(echo ${GITHUB_REF#refs/tags/v})" >> $GITHUB_ENV
- name: Build
run: dotnet build --configuration Release
- name: Pack
run: dotnet pack --configuration Release /p:Version=${VERSION} --output .
- name: Push CycleTLS
run: dotnet nuget push CycleTLS.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_API_KEY}
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
- name: Push CycleTLS.RestSharp
run: dotnet nuget push CycleTLS.RestSharp.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_API_KEY}
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
- name: Push CycleTLS.HttpClient
run: dotnet nuget push CycleTLS.HttpClient.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_API_KEY}
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}