@@ -48,23 +48,41 @@ jobs:
4848 retention-days : 2
4949 release :
5050 needs : build
51- name : Release to Feedz.io
52- if : startsWith(github.ref, 'refs/tags')
5351 runs-on : ubuntu-latest
5452 steps :
55- - name : Setup .NET 8
56- 53+ - name : checkout code
54+ 55+ - name : Setup .NET
56+ 5757 with :
58- dotnet-version : 8 .0.x
58+ dotnet-version : 10 .0.x
5959 - name : Download artifacts
60- uses : actions/download-artifact@v6.0 .0
60+ uses : actions/download-artifact@v4.3 .0
6161 with :
6262 name : nuget-packages
6363 path : nugets/
64- - name : Push package to Feedz.io
65- run : dotnet nuget push ./nugets/*.nupkg --source https://f.feedz.io/servicecomposer/pre-releases/nuget --api-key ${{ secrets.FEEDZ_API_KEY }}
66- - name : Push symbols to Feedz.io
67- run : dotnet nuget push ./nugets/*.snupkg --source https://f.feedz.io/servicecomposer/pre-releases/symbols --api-key ${{ secrets.FEEDZ_API_KEY }}
68-
69-
70-
64+ - name : Check Tag Type
65+ id : check-tag-type
66+ if : github.ref_type == 'tag'
67+ run : |
68+ if [[ ${{ github.ref_name }} =~ [0-9]+.[0-9]+.[0-9]+$ ]]; then
69+ echo "release-type=production" >> $GITHUB_OUTPUT
70+ else
71+ echo "release-type=pre-release" >> $GITHUB_OUTPUT
72+ fi
73+ - name : Deploy pre-release to Feedz.io
74+ if : steps.check-tag-type.outputs.release-type == 'pre-release'
75+ run : |
76+ echo "Tag is pre-release"
77+ echo "Pushing package to Feedz.io"
78+ dotnet nuget push ./nugets/*.nupkg --source https://f.feedz.io/servicecomposer/pre-releases/nuget --api-key ${{ secrets.FEEDZ_API_KEY }}
79+ echo "Pushing Symbols to Feedz.io"
80+ dotnet nuget push ./nugets/*.snupkg --source https://f.feedz.io/servicecomposer/pre-releases/symbols --api-key ${{ secrets.FEEDZ_API_KEY }}
81+ - name : Deploy release to NuGet
82+ if : steps.check-tag-type.outputs.release-type == 'production'
83+ run : |
84+ echo "Tag is production"
85+ echo "Pushing package to NuGet.org"
86+ dotnet nuget push ./nugets/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }}
87+ echo "Pushing Symbols to NuGet.org"
88+ dotnet nuget push ./nugets/*.snupkg --api-key ${{ secrets.NUGET_API_KEY }}
0 commit comments