@@ -12,25 +12,25 @@ 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@v4
1818 with :
19- dotnet-version : 7 .0.x
20-
19+ dotnet-version : 10 .0.x
20+
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
27-
27+
2828 - name : Run Unit Tests
2929 run : |
3030 dotnet restore
3131 dotnet build
3232 dotnet test test/NosCore.Algorithm.Tests -v m
33-
33+
3434 - name : Build Artifact
3535 if : steps.check-tag.outputs.match == 'true'
3636 id : build_artifact
@@ -39,24 +39,13 @@ jobs:
3939 dotnet build -c Release
4040 dotnet pack -c Release -o /tmp/nupkgs -v m -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
4141 dotnet nuget push /tmp/nupkgs/NosCore.Algorithm.${{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.Algorithm.${{github.event.ref}}.nupkg
43- echo ::set-output name=ARTIFACT_NAME::NosCore.Algorithm.${{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 : ${{ secrets.REPO_TOKEN }}
51-
42+ echo "ARTIFACT_PATH=/tmp/nupkgs/NosCore.Algorithm.${{github.event.ref}}.nupkg" >> $GITHUB_OUTPUT
43+ echo "ARTIFACT_NAME=NosCore.Algorithm.${{github.event.ref}}.nupkg" >> $GITHUB_OUTPUT
44+
5245 - name : Upload Release Asset
5346 if : steps.check-tag.outputs.match == 'true'
54- uses : actions/upload-release-asset@v1
5547 env :
56- GITHUB_TOKEN : ${{ secrets.REPO_TOKEN }}
57- 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
62-
48+ GH_TOKEN : ${{ secrets.REPO_TOKEN }}
49+ run : |
50+ gh release upload ${{ github.event.ref }} ${{ steps.build_artifact.outputs.ARTIFACT_PATH }}
51+
0 commit comments