-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to net6.0, moved to GitHub actions, removed deprecations (#15)
- Loading branch information
1 parent
ad04873
commit efede0d
Showing
30 changed files
with
2,214 additions
and
2,386 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: Build | ||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- "*" | ||
pull_request: | ||
jobs: | ||
calculate-version: | ||
runs-on: ubuntu-20.04 | ||
outputs: | ||
version: ${{ steps.version.outputs.version }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 | ||
- name: Install GitVersion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
versionSpec: "5.8.1" | ||
- name: Run GitVersion | ||
id: gitversion | ||
uses: gittools/actions/gitversion/[email protected] | ||
- name: Version | ||
id: version | ||
run: | | ||
version=${{ steps.gitversion.outputs.nuGetVersionV2 }} | ||
if [ "${{ github.event_name }}" == "pull_request" ] | ||
then | ||
version=${version}-${{ steps.gitversion.outputs.shortSha }} | ||
fi | ||
echo "::set-output name=version::${version}" | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
needs: [calculate-version] | ||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-20.04 | ||
nugetPush: false | ||
- os: windows-2019 | ||
nugetPush: true | ||
- os: macos-10.15 | ||
nugetPush: false | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
- name: Setup dotnet SDK | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: "6.0.101" | ||
- name: Build | ||
run: | | ||
dotnet build -c Release -p:Version=${{ needs.calculate-version.outputs.version }} | ||
shell: bash | ||
- name: Test | ||
run: dotnet test -c Release --no-build | ||
shell: bash | ||
- name: Archive NuGet Packages | ||
uses: actions/upload-artifact@v2 | ||
if: ${{ matrix.nugetPush }} | ||
with: | ||
name: packages | ||
path: | | ||
**/*.nupkg | ||
**/*.snupkg | ||
retention-days: 1 | ||
nuget-push: | ||
runs-on: ubuntu-20.04 | ||
needs: [build] | ||
if: github.event_name != 'pull_request' | ||
steps: | ||
- name: Download NuGet Packages | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: packages | ||
- name: NuGet Push | ||
run: dotnet nuget push **/*.nupkg -s https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.