-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 1.2 KB
/
deploy-algorithms-comparison.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
35
36
37
38
39
40
41
name: Publish - NetPlus.Algorithms.Comparison
on:
release:
types:
- created
branches:
- 'release/*'
jobs:
build-and-push-algorithms-comparison:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: "8.0"
- name: Install nuget CLI
run: |
sudo curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
alias nuget="mono /usr/local/bin/nuget.exe"
- name: Get tag name
id: get_tag
run: echo "TAG_NAME=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV
- name: Build Project and Pack NuGet package
run: |
dotnet pack src/NetPlus.Algorithms/NetPlus.Algorithms.Comparison/NetPlus.Algorithms.Comparison.csproj --configuration Release --output nupkg /p:PackageVersion=$TAG_NAME
- name: Push NuGet Package
run: |
nupkg_path="*/*.nupkg"
nuget push $nupkg_path -Source https://api.nuget.org/v3/index.json -ApiKey ${{ secrets.NUGET_API_KEY }}
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}