Skip to content

Commit 47f630f

Browse files
committed
enable publish
1 parent 673ea08 commit 47f630f

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

.github/workflows/build_publish.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@ jobs:
2828
name: ChefKeys
2929
path: Output/Release/
3030

31-
# - name: Publish To NuGet
32-
# if: ${{ github.ref == 'refs/heads/main' }}
33-
# run: nuget push Output\Release\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.PUBLISH}}
31+
- name: publish to nuget
32+
if: ${{ github.ref == 'refs/heads/main' }}
33+
run: nuget push output\release\*.nupkg -source 'https://api.nuget.org/v3/index.json' -apikey ${{secrets.publish}}
3434

35-
# - name: Get Version
36-
# if: ${{ github.ref == 'refs/heads/main' }}
37-
# run: |
38-
# $version = [System.Diagnostics.FileVersionInfo]::GetVersionInfo("Output\Release\ChefKeys.dll").ProductVersion
39-
# echo "RELEASE_VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
35+
- name: get version
36+
if: ${{ github.ref == 'refs/heads/main' }}
37+
run: |
38+
$version = [system.diagnostics.fileversioninfo]::getversioninfo("output\release\chefkeys.dll").productversion
39+
echo "release_version=$version" | out-file -filepath $env:github_env -encoding utf-8 -append
4040
41-
# - name: Publish To GitHub Releases
42-
# if: ${{ github.ref == 'refs/heads/main' }}
43-
# uses: softprops/action-gh-release@v1
44-
# with:
45-
# files: "Output\\Release\\*.nupkg"
46-
# tag_name: "v${{ env.RELEASE_VERSION }}"
41+
- name: publish to github releases
42+
if: ${{ github.ref == 'refs/heads/main' }}
43+
uses: softprops/action-gh-release@v1
44+
with:
45+
files: "output\\release\\*.nupkg"
46+
tag_name: "v${{ env.release_version }}"

0 commit comments

Comments
 (0)