Skip to content

Commit 2b93cab

Browse files
committed
feat: .net 6
BREAKING CHANGE .NET 6 version
1 parent de8b5e8 commit 2b93cab

File tree

2 files changed

+24
-7
lines changed

2 files changed

+24
-7
lines changed

.github/workflows/publish-package.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ on:
55
branches: [ master ]
66

77
env:
8-
PACKAGE_MAJOR_VERSION: 5
9-
PACKAGE_MINOR_VERSION: 0
108
CURRENT_REPO_URL: https://github.com/${{ github.repository }}
119

1210
jobs:
@@ -20,6 +18,11 @@ jobs:
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

.github/workflows/pull-request.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ jobs:
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:
@@ -24,7 +29,7 @@ jobs:
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

0 commit comments

Comments
 (0)