update gitea workflow;

This commit is contained in:
2025-11-04 17:39:31 +09:00
parent 49e1171781
commit fd1ed8793d
3 changed files with 17 additions and 15 deletions

View File

@@ -26,20 +26,23 @@ jobs:
- name: Pack all projects
run: |
for projfile in $(find . -name "*.csproj"); do
packable=$(dotnet msbuild "$projfile" -t:GetProperty -p:PropertyName=IsPackable -nologo -v:q)
if [ "$packable" = "true" ]; then
dotnet pack "$projfile" -c Release
fi
done
set -e
for projfile in $(find . -name "*.csproj"); do
if grep -q "<IsPackable>true</IsPackable>" "$projfile"; then
echo "Packing $projfile..."
if ! dotnet pack "$projfile" -c Release -o ./artifacts; then
echo "⚠️ Failed to pack $projfile"
fi
fi
done
- name: Publish all packages
env:
NUGET_API_KEY: ${{ secrets.GITEA_TOKEN }}
NUGET_API_KEY: ${{ secrets.NUGET_TOKEN }}
run: |
for projfile in $(find . -name "*.csproj"); do
packable=$(dotnet msbuild "$projfile" -t:GetProperty -p:PropertyName=IsPackable -nologo -v:q)
if [ "$packable" = "true" ]; then
if [ "$packable" = "True" ]; then
projname=$(basename "$projfile" .csproj)
VERSION=$(dotnet msbuild "$projfile" -nologo -v:q -t:GetProperty -p:PropertyName=PackageVersion)
pkg=$(find "$projname/bin/Release" -maxdepth 1 -type f \