Skip to content

Commit 5e699f9

Browse files
Update CD.yml to make pass
1 parent d8e4bdb commit 5e699f9

File tree

1 file changed

+1
-33
lines changed

1 file changed

+1
-33
lines changed

.github/workflows/CD.yml

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: CD
22

33
on:
4+
workflow_dispatch:
45
# workflow_dispatch:
56
release:
67
types: [published]
@@ -41,36 +42,3 @@ jobs:
4142
- name: Setup NuGet
4243
uses: NuGet/setup-nuget@v1.0.5
4344

44-
- name: Restore NuGet packages.sln
45-
run: nuget restore ./src/${{ env.FILE_NAME}}.sln
46-
47-
- name: Build Solution
48-
run: msbuild ./src/${{ env.FILE_NAME}}.sln /p:Configuration=Release
49-
50-
- name: Prepare .nuspec
51-
run: |
52-
$nuspecPath = "src/${{ env.FILE_NAME }}.nuspec.in"
53-
$nuspec = Get-Content $nuspecPath
54-
$nuspec = $nuspec -replace '\$\{\{ env.FILE_NAME \}\}', '${{ env.FILE_NAME }}'
55-
$nuspec = $nuspec -replace '\$\{\{ env.TITLE \}\}', '${{ env.TITLE }}'
56-
$nuspec = $nuspec -replace '\$\{\{ env.DESCRIPTION \}\}', '${{ env.DESCRIPTION }}'
57-
$nuspec = $nuspec -replace '\$\{\{ env.TAGS \}\}', '${{ env.TAGS }}'
58-
$nuspec = $nuspec -replace '\$\{\{ env.GITHUB_URL \}\}', '${{ env.GITHUB_URL }}'
59-
$nuspec = $nuspec -replace '\$\{\{ env.REPOSITORY_URL \}\}', '${{ env.REPOSITORY_URL }}'
60-
Set-Content ThunderDesign.Net-PCL.nuspec $nuspec
61-
shell: pwsh
62-
63-
- name: Create NuGet Package
64-
# run: nuget pack ThunderDesign.Net-PCL.nuspec -Version 1.1.4 -OutputDirectory ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
65-
run: nuget pack ThunderDesign.Net-PCL.nuspec -Version ${{ github.event.release.tag_name }} -OutputDirectory ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
66-
67-
- name: Archive NuGet Package
68-
uses: actions/upload-artifact@v4
69-
with:
70-
# name: Package_${{ env.FILE_NAME}}.1.1.4
71-
# path: ${{ env.PACKAGE_OUTPUT_DIRECTORY}}\${{ env.FILE_NAME}}.1.1.4.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
74-
75-
- name: Publish NuGet Package
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)