Skip to content

Commit 2b66dd8

Browse files
Update CD.yml
1 parent fd9048b commit 2b66dd8

1 file changed

Lines changed: 16 additions & 21 deletions

File tree

.github/workflows/CD.yml

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
name: CD
22

33
on:
4-
workflow_dispatch:
5-
#release:
6-
#types: [published]
4+
release:
5+
types: [published]
76

87
env:
98
TITLE: ".NET Development ToolBox"
109
DESCRIPTION: "A set of core methods and classes to ease every days .NET development tasks."
1110
TAGS: "thunderdesign toolbox visual%2Dstudio c%2Dsharp dotnet%2Dstandard dotnet%2Dframework dotnet%2Dcore cross%2Dplatform pcl%2Dlibrary mono xamarin%2Dforms xamarin%2Dandroid xamarin%2Dios xamarin%2Dmac xamarin%2Duwp unity csharp net dotnet"
12-
FILE_NAME: ex: "ThunderDesign.Net-PCL.ToolBox"
13-
#FILE_NAME: "${{ github.event.repository.name }}"
14-
REPOSITORY_NAME: ex: "ThunderDesign.Net-PCL.ToolBox"
15-
#REPOSITORY_NAME: ${{ github.event.repository.name }}
16-
REPOSITORY_OWNER: ex: "ThunderDesign"
17-
#REPOSITORY_OWNER: ${{ github.repository_owner }}
18-
GITHUB_URL: ex: "https://github.com/ThunderDesign"
19-
#GITHUB_URL: ${{ github.server_url }}/${{ github.repository_owner }}
20-
REPOSITORY_URL: ex: "https://github.com/ThunderDesign/ThunderDesign.Net-PCL.ToolBox"
21-
#REPOSITORY_URL: ${{ github.server_url }}/${{ github.repository_owner }}/${{ github.event.repository.name }}
11+
#FILE_NAME: ex: "ThunderDesign.Net-PCL.ToolBox"
12+
FILE_NAME: "${{ github.event.repository.name }}"
13+
#REPOSITORY_NAME: ex: "ThunderDesign.Net-PCL.ToolBox"
14+
REPOSITORY_NAME: ${{ github.event.repository.name }}
15+
#REPOSITORY_OWNER: ex: "ThunderDesign"
16+
REPOSITORY_OWNER: ${{ github.repository_owner }}
17+
#GITHUB_URL: ex: "https://github.com/ThunderDesign"
18+
GITHUB_URL: ${{ github.server_url }}/${{ github.repository_owner }}
19+
#REPOSITORY_URL: ex: "https://github.com/ThunderDesign/ThunderDesign.Net-PCL.ToolBox"
20+
REPOSITORY_URL: ${{ github.server_url }}/${{ github.repository_owner }}/${{ github.event.repository.name }}
2221

2322
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}\output
2423

@@ -65,17 +64,13 @@ jobs:
6564
shell: pwsh
6665

6766
- name: Create NuGet Package
68-
run: nuget pack ThunderDesign.Net-PCL.nuspec -Version 3.1.0 -OutputDirectory ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
69-
#run: nuget pack ThunderDesign.Net-PCL.nuspec -Version ${{ github.event.release.tag_name }} -OutputDirectory ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
67+
run: nuget pack ThunderDesign.Net-PCL.nuspec -Version ${{ github.event.release.tag_name }} -OutputDirectory ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
7068

7169
- name: Archive NuGet Package
7270
uses: actions/upload-artifact@v4
7371
with:
74-
name: Package_${{ env.FILE_NAME}}.3.1.0
75-
path: ${{ env.PACKAGE_OUTPUT_DIRECTORY}}\${{ env.FILE_NAME}}.3.1.0.nupkg
76-
#name: Package_${{ env.FILE_NAME}}.${{ github.event.release.tag_name }}
77-
#path: ${{ env.PACKAGE_OUTPUT_DIRECTORY}}\${{ env.FILE_NAME}}.${{ github.event.release.tag_name }}.nupkg
72+
name: Package_${{ env.FILE_NAME}}.${{ github.event.release.tag_name }}
73+
path: ${{ env.PACKAGE_OUTPUT_DIRECTORY}}\${{ env.FILE_NAME}}.${{ github.event.release.tag_name }}.nupkg
7874

7975
- name: Publish NuGet Package
80-
run: nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY}}\${{ env.FILE_NAME}}.3.1.0.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey ${{ secrets.NUGET_API_KEY }}
81-
#run: nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY}}\${{ env.FILE_NAME}}.${{ github.event.release.tag_name }}.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey ${{ secrets.NUGET_API_KEY }}
76+
run: nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY}}\${{ env.FILE_NAME}}.${{ github.event.release.tag_name }}.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey ${{ secrets.NUGET_API_KEY }}

0 commit comments

Comments
 (0)