-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (34 loc) · 1.16 KB
/
Copy pathrelease.yml
File metadata and controls
45 lines (34 loc) · 1.16 KB
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
name: Release-CD
on:
push:
branches: [ main ]
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
GITHUB_NUGET_API_KEY: ${{ secrets.GH_TOKEN }}
NUGET_API_URL: ${{ vars.NUGET_API_URL }}
GITHUB_NUGET_API_URL: ${{ vars.GH_NUGET_API_URL }}
PROJECT_FILE_PATH: 'src/fluent-execution/Dapper.FluentExecution.csproj'
jobs:
build:
name: Build stage
uses: ./.github/workflows/build.yml
test:
name: Test stage
needs: [ build ]
uses: ./.github/workflows/test.yml
Publish:
name: Publishing application
needs: [ build, test ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Creating project package
run: dotnet pack $PROJECT_FILE_PATH --configuration Release -o nupkg
- name: Publishing package on Nuget V3
run: dotnet nuget push ./nupkg/*.nupkg --source $NUGET_API_URL --skip-duplicate --api-key $NUGET_API_KEY
- name: Publishing package on Github Nuget
run: dotnet nuget push ./nupkg/*.nupkg --source $GITHUB_NUGET_API_URL --skip-duplicate --api-key $GITHUB_NUGET_API_KEY