Update workflow;
Some checks failed
Publish NuGet Packages / publish (push) Failing after 1m41s

This commit is contained in:
2025-11-04 18:32:44 +09:00
parent b32d4ca1b7
commit 36b8bd06d5
6 changed files with 32 additions and 22 deletions

View File

@@ -2,8 +2,12 @@ name: Publish NuGet Packages
on:
push:
tags:
- 'v*' # Trigger only on semantic version tags
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
publish:
@@ -26,9 +30,8 @@ jobs:
- name: Pack all projects
run: |
set -e
for projfile in $(find . -name "*.csproj"); do
if grep -q "<IsPackable>True</IsPackable>" "$projfile"; then
if grep -q "<GeneratePackageOnBuild>True</GeneratePackageOnBuild>" "$projfile"; then
echo "Packing $projfile..."
if ! dotnet pack "$projfile" -c Release -o ./artifacts; then
echo "Failed to pack $projfile"
@@ -40,10 +43,9 @@ jobs:
env:
NUGET_API_KEY: ${{ secrets.NUGET_TOKEN }}
run: |
set -x
set +e
for projfile in $(find . -name "*.csproj"); do
if grep -q "<IsPackable>True</IsPackable>" "$projfile"; then
if grep -q "<GeneratePackageOnBuild>True</GeneratePackageOnBuild>" "$projfile"; then
projname=$(basename "$projfile" .csproj)
echo "Checking $projname..."
pkg=$(find ./artifacts -maxdepth 1 -type f \
@@ -57,4 +59,4 @@ jobs:
echo "No package found for $projname"
fi
fi
done
done