Skip to content

chore(deps): update dotnet monorepo #401

chore(deps): update dotnet monorepo

chore(deps): update dotnet monorepo #401

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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Install .NET Core
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # 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@d22cc5f58ff5b88bf9bd452535b4335137e24544 # 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 }}