Skip to content

chore: Bump Microsoft.Extensions.Diagnostics.Testing from 10.0.0 to 1… #53

chore: Bump Microsoft.Extensions.Diagnostics.Testing from 10.0.0 to 1…

chore: Bump Microsoft.Extensions.Diagnostics.Testing from 10.0.0 to 1… #53

Workflow file for this run

---
name: tool
on:
push:
branches:
- master
paths-ignore:
- doc/**
- img/**
- changelog.md
- readme.md
tags:
- '*'
pull_request:
paths-ignore:
- doc/**
- img/**
- changelog.md
- readme.md
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install .NET Core
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'
- name: Should Deploy?
if: ${{ success() && github.event_name == 'push' }}
shell: pwsh
run: |
if ("${{github.ref}}" -match "^refs/tags/([0-9]+\.[0-9]+\.[0-9]+)")
{
$version = $Matches[1]
echo "UNITYNUGET_DEPLOY=1" >> $env:GITHUB_ENV
echo "UNITYNUGET_VERSION=$version" >> $env:GITHUB_ENV
}
- name: Pack
if: ${{ success() && env.UNITYNUGET_DEPLOY != 1 }}
run: dotnet pack src/UnityNuGet.Tool/UnityNuGet.Tool.csproj -c Release -o ${{ runner.temp }}
- name: Pack (Release)
if: ${{ success() && env.UNITYNUGET_DEPLOY == 1 }}
run: dotnet pack src/UnityNuGet.Tool/UnityNuGet.Tool.csproj -c Release -p:PackageVersion=$UNITYNUGET_VERSION -o ${{ runner.temp }}
- name: NuGet login
if: ${{ success() && env.UNITYNUGET_DEPLOY == 1 }}
uses: NuGet/login@v1
id: login
with:
user: ${{ secrets.NUGET_USER }}
- name: Publish (Release)
if: ${{ success() && env.UNITYNUGET_DEPLOY == 1 }}
run: |
dotnet nuget push ${{ runner.temp }}/UnityNuGet.Tool.${{ env.UNITYNUGET_VERSION }}.nupkg \
--source https://api.nuget.org/v3/index.json \
--api-key ${{ steps.login.outputs.NUGET_API_KEY }}