diff --git a/.gitea/workflows/backup.rar b/.gitea/workflows/backup.rar deleted file mode 100644 index 1b32ea8..0000000 Binary files a/.gitea/workflows/backup.rar and /dev/null differ diff --git a/.gitea/workflows/release-nuget.yml b/.gitea/workflows/release-nuget.yml index 615fe33..4b7e97f 100644 --- a/.gitea/workflows/release-nuget.yml +++ b/.gitea/workflows/release-nuget.yml @@ -27,12 +27,36 @@ jobs: run: | git clone --depth 1 https://git.sabp.ir/sufi-chain/dev-ops-test.git . + - name: Create NuGet.Config for HTTP BaGet + shell: bash + run: | + set -euo pipefail + + if [ -z "${NUGET_SOURCE_URL:-}" ]; then + echo "NUGET_SOURCE_URL secret/env is required." + exit 1 + fi + + cat > NuGet.Config < + + + + + + + + EOF + + echo "NuGet.Config created:" + cat NuGet.Config + - name: Restore selected projects shell: bash run: | set -euo pipefail for project in $PACKAGE_PROJECTS; do - dotnet restore "$project" + dotnet restore "$project" --configfile NuGet.Config done - name: Build selected projects @@ -67,6 +91,7 @@ jobs: NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} run: | set -euo pipefail + if [ -z "${NUGET_API_KEY:-}" ]; then echo "NUGET_API_KEY secret is required." exit 1 @@ -74,14 +99,17 @@ jobs: shopt -s nullglob packages=("$PACKAGE_OUTPUT"/*.nupkg) + if [ ${#packages[@]} -eq 0 ]; then echo "No NuGet packages were produced." exit 1 fi for package in "${packages[@]}"; do + echo "Pushing $package ..." dotnet nuget push "$package" \ - --source "$NUGET_SOURCE_URL" \ + --source baget \ --api-key "$NUGET_API_KEY" \ - --skip-duplicate + --skip-duplicate \ + --configfile NuGet.Config done diff --git a/.gitea/workflows/workflows.zip b/.gitea/workflows/workflows.zip new file mode 100644 index 0000000..0cc64e8 Binary files /dev/null and b/.gitea/workflows/workflows.zip differ