@@ -12,24 +12,27 @@ jobs:
1212 build :
1313 runs-on : ubuntu-latest
1414 steps :
15- - uses : actions/checkout@v2
15+ - uses : actions/checkout@v4
1616 - name : Setup .NET
17- uses : actions/setup-dotnet@v3
17+ uses : actions/setup-dotnet@v5
1818 with :
19- dotnet-version : 8 .0.x
19+ dotnet-version : ' 10 .0.x'
2020
2121 - name : Check Tag
2222 id : check-tag
2323 run : |
2424 if [[ v${{ github.event.ref }} =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
25- echo ::set-output name= match:: true
25+ echo " match= true" >> $GITHUB_OUTPUT
2626 fi
2727
28- - name : Run Unit Tests
29- run : |
30- dotnet restore
31- dotnet build
32- dotnet test test/NosCore.Shared.Tests -v m
28+ - name : Restore dependencies
29+ run : dotnet restore
30+
31+ - name : Build
32+ run : dotnet build --no-restore --configuration Debug
33+
34+ - name : Test
35+ run : dotnet test test/NosCore.Shared.Tests --no-build --configuration Debug --verbosity normal
3336
3437 - name : Build Artifact
3538 if : steps.check-tag.outputs.match == 'true'
@@ -39,23 +42,13 @@ jobs:
3942 dotnet build -c Release
4043 dotnet pack -c Release -o /tmp/nupkgs -v m -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
4144 dotnet nuget push /tmp/nupkgs/NosCore.Shared.${{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.Shared.${{github.event.ref}}.nupkg
43- echo ::set-output name=ARTIFACT_NAME::NosCore.Shared.${{github.event.ref}}.nupkg
44-
45- - name : Gets Latest Release
46- if : steps.check-tag.outputs.match == 'true'
47- id : latest_release_info
48- uses : jossef/action-latest-release-info@v1.1.0
49- env :
50- GITHUB_TOKEN : ${{ github.token }}
45+ echo "ARTIFACT_PATH=/tmp/nupkgs/NosCore.Shared.${{github.event.ref}}.nupkg" >> $GITHUB_OUTPUT
46+ echo "ARTIFACT_NAME=NosCore.Shared.${{github.event.ref}}.nupkg" >> $GITHUB_OUTPUT
5147
5248 - name : Upload Release Asset
5349 if : steps.check-tag.outputs.match == 'true'
54- uses : actions/upload-release-asset@v1
55- env :
56- GITHUB_TOKEN : ${{ github.token }}
50+ uses : softprops/action-gh-release@v2
5751 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
52+ files : ${{ steps.build_artifact.outputs.ARTIFACT_PATH }}
53+ env :
54+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments