-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (38 loc) · 1.17 KB
/
ci.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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup .NET Core SDK
uses: actions/[email protected]
with:
version: 3.1.100
- name: dotnet build
run: dotnet build opulence.sln -c Release
- name: dotnet test
run: dotnet test opulence.sln -c Release --no-build
- name: dotnet pack
run: |
mkdir ./artifacts
dotnet pack opulence.sln -c Release --no-build -o ./artifacts
- name: setup nuget
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: NuGet/[email protected]
with:
nuget-version: latest
- name: push packages (feedz.io)
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
for f in ./artifacts/*.nupkg
do
nuget push $f -source https://f.feedz.io/opulence/opulence/nuget/index.json -ApiKey ${{ secrets.FEEDZ_TOKEN }}
if [ $? -eq 0 ]
then
echo "successfully pushed $f"
else
echo "failed to push $f" >&2
exit 1
fi
done