forked from RusticiSoftware/TinCan.NET
-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (38 loc) · 1.52 KB
/
deploy.yml
File metadata and controls
42 lines (38 loc) · 1.52 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: Deploy
on:
release:
types: [published]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
deploy:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
6.0.x
7.0.x
- name: Restore dependencies
run: dotnet restore
- name: Set Assembly Version
run: ./build.sh --task=GitVersion --configuration=Release
- name: Build Library
run: dotnet build --configuration Release --no-restore
- name: Update Version
run: sed -i "s/<Version><\/Version>/<Version>${{ github.event.release.name }}<\/Version>/" ./Float.TinCan/Float.TinCan.csproj
- name: Pack and Upload
run: dotnet pack --configuration Release --no-restore
# Runs a single command using the runners shell
- name: Deploy to NuGet
env:
FLOAT_NUGET_TOKEN: ${{ secrets.FLOAT_NUGET_TOKEN }}
run: dotnet nuget push ./Float.TinCan/bin/Release/Float.TinCan.${{ github.event.release.name }}.nupkg --api-key "${FLOAT_NUGET_TOKEN}" --source https://api.nuget.org/v3/index.json