-
Notifications
You must be signed in to change notification settings - Fork 23
59 lines (48 loc) · 1.46 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Publish
on:
release:
types: [ published ]
permissions:
contents: read
pull-requests: write
jobs:
build-tests:
name: Tests
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Build
run: dotnet build --configuration Release
- name: Run unit tests
run: dotnet test --no-build --configuration Release /p:CollectCoverage=true /p:CoverletOutputFormat=lcov
- name: Publish coverage report to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./Bynder/Test/coverage.info
continue-on-error: true
publish-nuget:
name: Release
runs-on: ubuntu-22.04
needs: build-tests
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Publish to NuGet
uses: brandedoutcast/[email protected]
with:
PROJECT_FILE_PATH: Bynder/Sdk/Bynder.Sdk.csproj
VERSION_REGEX: '^\s*<PackageVersion>(.*)<\/PackageVersion>\s*$'
TAG_FORMAT: '*'
NUGET_KEY: ${{secrets.NUGET_API_KEY}}