-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (54 loc) · 1.54 KB
/
postslistener.client.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Build and publish PostsListener.Client
on:
workflow_dispatch:
push:
paths:
- "src/PostsListener.Client/**"
- "test/PostsListener.Client.Tests/**"
pull_request:
paths:
- "src/PostsListener.Client/**"
- "test/PostsListener.Client.Tests/**"
env:
DOTNET_VERSION: 5.0.x
jobs:
test:
runs-on: ubuntu-latest
services:
rabbitmq:
image: rabbitmq:3.6-management-alpine
ports:
- 5672:5672
scraper:
image: themulti0/scraper:latest
postslistener:
image: themulti0/postslistener:latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore dependencies
run: dotnet restore src/PostsListener.Client
- name: Build
run: dotnet build --no-restore src/PostsListener.Client
- name: Test
run: dotnet test --no-build test/PostsListener.Client.Tests
publish:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.workflow_run.head_branch }}
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Publish on version change
uses: rohith/publish-nuget@v2
with:
PROJECT_FILE_PATH: src/PostsListener.Client/PostsListener.Client.csproj
NUGET_KEY: ${{ secrets.NUGET_API_KEY }}
TAG_COMMIT: false