@@ -12,17 +12,25 @@ jobs:
1212 build :
1313 runs-on : ubuntu-latest
1414 steps :
15- - uses : actions/checkout@v2
16- - name : Setup .NET
17- uses : actions/setup-dotnet@v3
15+ - uses : actions/checkout@v4
16+ - name : Setup .NET 10
17+ uses : actions/setup-dotnet@v4
1818 with :
19- dotnet-version : 8.0.x
19+ dotnet-version : ' 10.0.0'
20+ continue-on-error : true
21+ - name : Fallback - Install .NET 10 manually
22+ if : failure()
23+ run : |
24+ wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
25+ chmod +x dotnet-install.sh
26+ ./dotnet-install.sh --channel 10.0 --install-dir $HOME/.dotnet
27+ echo "$HOME/.dotnet" >> $GITHUB_PATH
2028
2129 - name : Check Tag
2230 id : check-tag
2331 run : |
2432 if [[ v${{ github.event.ref }} =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
25- echo ::set-output name= match:: true
33+ echo " match= true" >> $GITHUB_OUTPUT
2634 fi
2735
2836 - name : Run Unit Tests
@@ -39,23 +47,13 @@ jobs:
3947 dotnet build -c Release
4048 dotnet pack -c Release -o /tmp/nupkgs -v m -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
4149 dotnet nuget push /tmp/nupkgs/NosCore.Networking.${{github.event.ref}}.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}}
42- echo ::set-output name=ARTIFACT_PATH::/tmp/nupkgs/NosCore.Networking.${{github.event.ref}}.nupkg
43- echo ::set-output name=ARTIFACT_NAME::NosCore.Networking.${{github.event.ref}}.nupkg
44-
45- - name : Gets Latest Release
46- if : steps.check-tag.outputs.match == 'true'
47- id : latest_release_info
48- 49- env :
50- GITHUB_TOKEN : ${{ github.token }}
50+ echo "ARTIFACT_PATH=/tmp/nupkgs/NosCore.Networking.${{github.event.ref}}.nupkg" >> $GITHUB_OUTPUT
51+ echo "ARTIFACT_NAME=NosCore.Networking.${{github.event.ref}}.nupkg" >> $GITHUB_OUTPUT
5152
5253 - name : Upload Release Asset
5354 if : steps.check-tag.outputs.match == 'true'
54- uses : actions/upload-release-asset@v1
55- env :
56- GITHUB_TOKEN : ${{ github.token }}
55+ uses : softprops/action-gh-release@v2
5756 with :
58- upload_url : ${{ steps.latest_release_info.outputs.upload_url }}
59- asset_path : ${{ steps.build_artifact.outputs.ARTIFACT_PATH }}
60- asset_name : ${{ steps.build_artifact.outputs.ARTIFACT_NAME }}
61- asset_content_type : application/zip
57+ files : ${{ steps.build_artifact.outputs.ARTIFACT_PATH }}
58+ env :
59+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments