Update NanoByte.Common to v2.18.0 #447
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
name: Build | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
# Prepare | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
show-progress: false | |
- uses: gittools/actions/gitversion/[email protected] | |
with: | |
versionSpec: '5.12.x' | |
- uses: gittools/actions/gitversion/[email protected] | |
id: gitversion | |
# Build | |
- name: Build (pre-release) | |
if: github.ref_type != 'tag' | |
run: .\build.ps1 ${{steps.gitversion.outputs.nuGetVersion}}-${{steps.gitversion.outputs.shortSha}} | |
- name: Build (release) | |
if: github.ref_type == 'tag' | |
run: .\build.ps1 ${{steps.gitversion.outputs.nuGetVersion}} | |
- name: Report test results | |
if: always() | |
uses: dorny/test-reporter@v1 | |
with: | |
name: Test Report | |
reporter: dotnet-trx | |
path: src/UnitTests/TestResults/*.trx | |
# Release | |
- name: Create GitHub Release | |
if: github.ref_type == 'tag' | |
uses: softprops/action-gh-release@v1 | |
# Publish | |
- name: Publish packages (GitHub) | |
if: github.event_name == 'push' && !startsWith(github.ref_name, 'renovate/') | |
run: dotnet nuget push artifacts\Release\*.nupkg --source https://nuget.pkg.github.com/${{github.repository_owner}}/index.json --api-key ${{github.token}} --no-symbols --skip-duplicate | |
- name: Publish packages (NuGet.org) | |
if: github.ref_type == 'tag' | |
run: dotnet nuget push artifacts\Release\*.nupkg --source nuget.org --api-key ${{secrets.NUGET_API_KEY}} | |
- name: Publish documentation | |
if: github.ref_type == 'tag' | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{github.token}} | |
force_orphan: true | |
publish_dir: artifacts/Documentation | |
cname: structure-editor.nano-byte.net |