-
Notifications
You must be signed in to change notification settings - Fork 9
50 lines (38 loc) · 1.12 KB
/
pack.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
48
49
50
name: Pack
on:
push:
tags: v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.2.108
- name: Build with dotnet
run: dotnet build --configuration Release
- name: Test with nunit
run: dotnet test --verbosity normal
- name: Pack with nuget
run: dotnet pack --configuration=Release -p:PackageVersion=${GITHUB_REF:11} -o ../artifacts/
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: artifacts
path: ./artifacts/
- name: Setup nuget
uses: nuget/setup-nuget@v1
with:
nuget-version: 'latest'
- name: Setup nuget config
run: nuget sources add -name github -source "https://nuget.pkg.github.com/apmem/index.json" -username ${{ github.actor }} -password ${{ secrets.GITHUB_TOKEN }}
- name: Upload to GitHub Packages
run: |
for f in ./artifacts/*.nupkg
do
nuget push $f -Source "github"
done
shell: bash