Skip to content

Commit 94195cd

Browse files
committed
publish action
1 parent 41fc884 commit 94195cd

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: publish
2-
# This workflow is triggered when tagging
32

43
on:
54
workflow_dispatch:
@@ -29,13 +28,13 @@ jobs:
2928
3.1.x
3029
2.1.x
3130
32-
- name: Setup
33-
run: mkdir -p ${{ runner.temp }}/nuget-local-feed
31+
- name: Build Package
32+
run: dotnet pack --output nupkgs --include-source --include-symbols --configuration Release
3433

35-
- name: Build
36-
run: dotnet build --configuration Release
34+
- name: Publish Package
35+
run: dotnet nuget push nupkgs/*.nupkg --source $NUGET_SOURCE_URL --api-key $GITHUB_TOKEN
3736
env:
38-
NUGET_LOCAL_FEED_PATH: ${{ runner.temp }}/nuget-local-feed
39-
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
NUGET_SOURCE_URL: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
4039

4140

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ bin/
22
obj/
33
dotnet-install.sh
44
build
5-
# Ignore NuGet Packages
6-
*.nupkg
75
.tox
86
Deployment
7+
# Ignore NuGet Packages
8+
nupkgs/
9+
*.nupkg
10+
*.snupkg

buildtools/build.proj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353

5454
<Exec
5555
Command="dotnet nuget push \
56-
&quot;$(MSBuildThisFileDirectory)../Deployment/nuget-packages/*.nupkg&quot; --source &quot;local-feed&quot;"
56+
&quot;$(MSBuildThisFileDirectory)../Deployment/nuget-packages/*.nupkg&quot; --source &quot;$(NUGET_LOCAL_FEED_PATH)&quot;"
5757
WorkingDirectory="$(MSBuildProjectDirectory)"
5858
StdOutEncoding="utf-8" />
5959
</Target>
File renamed without changes.

0 commit comments

Comments
 (0)