-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (34 loc) · 1.17 KB
/
build-and-publish.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: Build and publish
on:
push:
branches: [ "master" ]
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Test
run: dotnet test --no-build --verbosity normal --configuration Release
- name: Publish package to nuget
uses: ./.github/workflows/publish_nuget_package
with:
PROJECT_FILE_PATH: NextGenMapper/NextGenMapper.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
NUGET_SOURCE: https://api.nuget.org/v3/index.json
VERSION_REGEX: ^\s*<Version>(.*)<\/Version>\s*$
- name: Publish package to github
uses: ./.github/workflows/publish_nuget_package
with:
PROJECT_FILE_PATH: NextGenMapper/NextGenMapper.csproj
NUGET_KEY: ${{secrets.GH_API_KEY}}
NUGET_SOURCE: https://nuget.pkg.github.com/DedAnton/index.json
VERSION_REGEX: ^\s*<Version>(.*)<\/Version>\s*$