Skip to content

Commit c1af364

Browse files
committed
implement publish
1 parent 2e2c213 commit c1af364

3 files changed

Lines changed: 19 additions & 27 deletions

File tree

.github/workflows/publish.yml

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
# ------------------------------------------------------------------------------
2-
# <auto-generated>
3-
#
4-
# This code was generated.
5-
#
6-
# - To turn off auto-generation set:
7-
#
8-
# [GitHubActions (AutoGenerate = false)]
9-
#
10-
# - To trigger manual generation invoke:
11-
#
12-
# nuke --generate-configuration GitHubActions_Publish --host GitHubActions
13-
#
14-
# </auto-generated>
15-
# ------------------------------------------------------------------------------
16-
171
name: Publish
182

193
on:
@@ -22,16 +6,21 @@ on:
226
- '*'
237

248
jobs:
25-
windows-latest:
26-
name: windows-latest
27-
runs-on: windows-latest
9+
publish:
10+
name: publish
11+
runs-on: ubuntu-latest
2812
steps:
29-
- uses: actions/checkout@v3
13+
14+
- uses: actions/checkout@v4
3015
with:
3116
fetch-depth: 0
32-
- name: Run './build.cmd PushToNuGet'
33-
run: ./build.cmd PushToNuGet
34-
env:
35-
NugetApiKey: ${{ secrets.NUGET_API_KEY }}
36-
NugetApiUrl: ${{ secrets.NUGET_API_URL }}
37-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
18+
- uses: actions/setup-dotnet@v4
19+
20+
- name: Pack
21+
run: |
22+
dotnet pack ./MediatR.Courier --configuration Release --output ./artifacts /p:Version="${GITHUB_REF_NAME}"
23+
24+
- name: Publish
25+
run: |
26+
dotnet nuget push ./artifacts/ --api-key "${{ secrets.NUGET_API_KEY }}"

.github/workflows/run-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ jobs:
5151
run: dotnet test --no-build --logger trx /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
5252

5353
- name: Sonar End
54-
run: dotnet dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
54+
run: dotnet dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"

nuget.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@
44
<clear />
55
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
66
</packageSources>
7+
<config>
8+
<add key="defaultPushSource" value="https://api.nuget.org/v3/index.json" />
9+
</config>
710
</configuration>

0 commit comments

Comments
 (0)