forked from rebus-org/Rebus.RabbitMq
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (48 loc) · 1.62 KB
/
dotnet-release.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: .NET Release
on:
push:
tags:
- 'v*.*.*'
jobs:
build-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: getong/rabbitmq-action@v1.2
with:
rabbitmq version: '3.8.2-management-alpine'
host port: 5672
rabbitmq user: 'guest'
rabbitmq password: 'guest'
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release
- name: Test
run: dotnet test Rebus.RabbitMq.Tests --no-build --verbosity normal -c Release
deploy:
needs: [build-ubuntu]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Install dependencies
run: |
dotnet clean
dotnet restore
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3 | cut -d "v" -f 2)
- name: Build
run: dotnet build --configuration Release
- name: Pack
run: dotnet pack Rebus.RabbitMq.sln -c Release -o ./artifacts -p:PackageVersion=${{ steps.get_version.outputs.VERSION }}
- name: Push generated Rebus package to GitHub registry
run: dotnet nuget push /home/runner/work/Rebus.RabbitMq/Rebus.RabbitMq/artifacts/Microting.Rebus.RabbitMq.${{ steps.get_version.outputs.VERSION }}.nupkg -k ${{secrets.NUGET_SECRET_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols