Skip to content

Merge pull request #222 from blizzard-net/updates-net8 #87

Merge pull request #222 from blizzard-net/updates-net8

Merge pull request #222 from blizzard-net/updates-net8 #87

Workflow file for this run

name: build
on: push
env:
DOTNET_NOLOGO: 1 # Disable the .NET welcome message
DOTNET_CLI_TELEMETRY_OPTOUT: 1 # Opt out of the .NET SDK telemetry feature
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: Install .NET 8 SDK
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0
with:
dotnet-version: 8.0.200
- name: Build
run: dotnet build --configuration Release --verbosity minimal
- name: Test
run: dotnet test --no-build --configuration Release --verbosity minimal
env:
BLIZZARD_CLIENT_ID: ${{ secrets.BLIZZARD_CLIENT_ID }}
BLIZZARD_CLIENT_SECRET: ${{ secrets.BLIZZARD_CLIENT_SECRET }}
- name: Upload build artifacts
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: NuGet packages
path: |
artifacts/*.nupkg
artifacts/*.snupkg
- name: Push NuGet packages to NuGet
if: ${{ startsWith(github.ref, 'refs/tags/v') }} # Only for a tag
run: dotnet nuget push "artifacts/**.nupkg" --skip-duplicate --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json
- name: Create GitHub Release
if: ${{ startsWith(github.ref, 'refs/tags/v') }} # Only for a tag
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false