-
Notifications
You must be signed in to change notification settings - Fork 372
47 lines (42 loc) · 1.36 KB
/
nuget_shared.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
42
43
44
45
46
47
name: nuget_shared
on:
workflow_dispatch:
branches:
- master
- dev
jobs:
build_artifact:
name: Build and upload artifact
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Build with dotnet
run: dotnet build --configuration Release /home/runner/work/adnc/adnc/src/ServerApi/ServiceShared/Adnc.Shared.sln
- name: Pack with dotnet
run: dotnet pack /home/runner/work/adnc/adnc/src/ServerApi/ServiceShared/Adnc.Shared.sln -o /home/runner/work/shared/nugetpkgs -c Release --no-build
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: nugetpkgs
path: /home/runner/work/shared/nugetpkgs
release_nuget:
name: Release to Nuget
needs: build_artifact
runs-on: ubuntu-latest
steps:
- name: Download build artifacts
uses: actions/download-artifact@v1
with:
name: nugetpkgs
- name: list nugetpkgs
run: ls nugetpkgs
- name: Release
run: |
for file in nugetpkgs/*.nupkg
do
dotnet nuget push $file --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate --source https://api.nuget.org/v3/index.json
done