File tree Expand file tree Collapse file tree 2 files changed +24
-7
lines changed
Expand file tree Collapse file tree 2 files changed +24
-7
lines changed Original file line number Diff line number Diff line change 55 branches : [ master ]
66
77env :
8- PACKAGE_MAJOR_VERSION : 5
9- PACKAGE_MINOR_VERSION : 0
108 CURRENT_REPO_URL : https://github.com/${{ github.repository }}
119
1210jobs :
2018 - name : Checkout repository
2119 uses : actions/checkout@v2
2220
21+ - name : Setup .NET 6
22+ uses : actions/setup-dotnet@v1
23+ with :
24+ dotnet-version : 6.0.x
25+
2326 - name : Setup .NET 5
2427 uses : actions/setup-dotnet@v1
2528 with :
@@ -30,11 +33,20 @@ jobs:
3033 with :
3134 dotnet-version : 3.1.x
3235
33- - name : Generate version
34- run : echo "PACKAGE_VERSION=$PACKAGE_MAJOR_VERSION.$PACKAGE_MINOR_VERSION.$GITHUB_RUN_NUMBER" >> $GITHUB_ENV
36+ - name : Semantic Release
37+ id : semantic
38+ uses : cycjimmy/semantic-release-action@v2
39+ with :
40+ semantic_version : 18.0.1
41+ extra_plugins : |
42+ @semantic-release/changelog
43+ @semantic-release/github
44+ @semantic-release/git
45+ env :
46+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3547
3648 - name : Generate Package
37- run : dotnet pack -c Release -o out -p:PackageVersion=${{env.PACKAGE_VERSION }} -p:RepositoryUrl=${{env.CURRENT_REPO_URL}}
49+ run : dotnet pack -c Release -o out -p:PackageVersion=${{ steps.semantic.outputs.new_release_version }} -p:RepositoryUrl=${{env.CURRENT_REPO_URL}}
3850
3951 - name : Publish the package to nuget.org
40- run : dotnet nuget push ./out/*.nupkg --skip-duplicate --no-symbols true -k ${{ secrets.NUGET_AUTH_TOKEN}} -s https://api.nuget.org/v3/index.json
52+ run : dotnet nuget push ./out/*.nupkg --skip-duplicate -n -d -k ${{ secrets.NUGET_AUTH_TOKEN}} -s https://api.nuget.org/v3/index.json
Original file line number Diff line number Diff line change 1515 - name : Checkout repository
1616 uses : actions/checkout@v2
1717
18+ - name : Setup .NET 6
19+ uses : actions/setup-dotnet@v1
20+ with :
21+ dotnet-version : 6.0.x
22+
1823 - name : Setup .NET 5
1924 uses : actions/setup-dotnet@v1
2025 with :
2429 uses : actions/setup-dotnet@v1
2530 with :
2631 dotnet-version : 3.1.x
27-
32+
2833 - name : Restore dependencies
2934 run : dotnet restore
3035
You can’t perform that action at this time.
0 commit comments