Skip to content

Commit

Permalink
feat: .net 6
Browse files Browse the repository at this point in the history
BREAKING CHANGE .NET 6 version
  • Loading branch information
brunobritodev committed Apr 18, 2022
1 parent de8b5e8 commit 2b93cab
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
branches: [ master ]

env:
PACKAGE_MAJOR_VERSION: 5
PACKAGE_MINOR_VERSION: 0
CURRENT_REPO_URL: https://github.com/${{ github.repository }}

jobs:
Expand All @@ -20,6 +18,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x

- name: Setup .NET 5
uses: actions/setup-dotnet@v1
with:
Expand All @@ -30,11 +33,20 @@ jobs:
with:
dotnet-version: 3.1.x

- name: Generate version
run: echo "PACKAGE_VERSION=$PACKAGE_MAJOR_VERSION.$PACKAGE_MINOR_VERSION.$GITHUB_RUN_NUMBER" >> $GITHUB_ENV
- name: Semantic Release
id: semantic
uses: cycjimmy/semantic-release-action@v2
with:
semantic_version: 18.0.1
extra_plugins: |
@semantic-release/changelog
@semantic-release/github
@semantic-release/git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Generate Package
run: dotnet pack -c Release -o out -p:PackageVersion=${{env.PACKAGE_VERSION}} -p:RepositoryUrl=${{env.CURRENT_REPO_URL}}
run: dotnet pack -c Release -o out -p:PackageVersion=${{ steps.semantic.outputs.new_release_version }} -p:RepositoryUrl=${{env.CURRENT_REPO_URL}}

- name: Publish the package to nuget.org
run: dotnet nuget push ./out/*.nupkg --skip-duplicate --no-symbols true -k ${{ secrets.NUGET_AUTH_TOKEN}} -s https://api.nuget.org/v3/index.json
run: dotnet nuget push ./out/*.nupkg --skip-duplicate -n -d -k ${{ secrets.NUGET_AUTH_TOKEN}} -s https://api.nuget.org/v3/index.json
7 changes: 6 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x

- name: Setup .NET 5
uses: actions/setup-dotnet@v1
with:
Expand All @@ -24,7 +29,7 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x

- name: Restore dependencies
run: dotnet restore

Expand Down

0 comments on commit 2b93cab

Please sign in to comment.