-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (27 loc) · 1.24 KB
/
build_and_deploy.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
name: CI
on:
push:
branches: [ release/* ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .Net
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Install dependencies
run: dotnet restore ./src
- name: Run Tests
run: dotnet test ./src
- name: Detect package version
id: get_version
uses: Simply007/get-version-action@7236f08751d7430451850869f00450fb02c25723
- name: Build Version ${{ steps.get_version.outputs.version }}+${{ github.run_number }}
run: dotnet build --configuration Release --no-restore ./src /p:PackageVersion=${{ steps.get_version.outputs.version-without-v }}
- name: Pack for NuGet
run: dotnet pack --configuration Release --no-build ./src/devCrowd.CustomBindings.EventSourcing/devCrowd.CustomBindings.EventSourcing.csproj -o . /p:PackageVersion=${{ steps.get_version.outputs.version-without-v }}+${{ github.run_number }}
- name: Publish to NuGet
run: dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json --api-key ${{secrets.EventSourcing_Nuget_ApiKey}} --skip-duplicate --no-symbols