-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (36 loc) · 1.21 KB
/
deploy.yml
File metadata and controls
39 lines (36 loc) · 1.21 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
name: Deploy
on:
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Retore Workload
run: dotnet workload restore
- name: Restore dependencies
run: dotnet restore
- name: .NET project version updater
uses: vers-one/dotnet-project-version-updater@v1.7
with:
files: |
"Float.Core/Float.Core.csproj", "**/*.nuspec", "**/AssemblyInfo.cs"
version: ${{ github.event.release.name }}
- name: Build Library
run: dotnet build ./Float.Core/Float.Core.csproj --configuration Release --no-restore
- name: Pack and Upload
run: dotnet pack --configuration Release --no-restore
- name: Deploy to NuGet
env:
FLOAT_NUGET_TOKEN: ${{ secrets.FLOAT_NUGET_TOKEN }}
run: dotnet nuget push ./Float.Core/bin/Release/Float.Core.${{ github.event.release.name }}.nupkg --api-key "${FLOAT_NUGET_TOKEN}" --source https://api.nuget.org/v3/index.json