From 56ad94337f9602782e65c2b9eb0fa3349aa64382 Mon Sep 17 00:00:00 2001 From: Simon Diesenreiter Date: Thu, 28 Nov 2024 01:29:55 -0800 Subject: [PATCH] fix auth --- .gitea/workflows/release.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index a268620..22df756 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -50,18 +50,17 @@ jobs: fi - name: Build and publish env: - GITEA_USERNAME: gitearobot - GITEA_PASSWORD: ${{ secrets.PACKAGE_GITEA_PAT }} + GITEA_PAT: ${{ secrets.PACKAGE_GITEA_PAT }} run: | REPOSITORY_OWNER=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $1}') REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $2}' | tr '-' '_') REPOSITORY_SOURCE_NAME=gitea-repo if [ -z "$(dotnet nuget config get all | grep "/packages/${REPOSITORY_OWNER}/nuget/index.json")" ]; then - dotnet nuget add source --name $REPOSITORY_SOURCE_NAME --username $GITEA_USERNAME --password $GITEA_PASSWORD https://git.disi.dev/api/packages/$REPOSITORY_OWNER/nuget/index.json + dotnet nuget add source --name $REPOSITORY_SOURCE_NAME https://git.disi.dev/api/packages/$REPOSITORY_OWNER/nuget/index.json else QUOTED_REPOSITORY_SOURCE_NAME=$(dotnet nuget config get all | grep "/packages/${REPOSITORY_OWNER}/nuget/index.json" | awk '{print $2}' | awk -F= '{print $2}') REPOSITORY_SOURCE_NAME=${QUOTED_REPOSITORY_SOURCE_NAME:1:-1} fi dotnet pack --include-symbols --include-source -p:PackageVersion=$(cat $REPOSITORY_NAME/VERSION) DotnetTestLib.sln - dotnet nuget push --source $REPOSITORY_SOURCE_NAME $REPOSITORY_NAME/bin/Release/$REPOSITORY_NAME.$(cat $REPOSITORY_NAME/VERSION).nupkg - dotnet nuget push --source $REPOSITORY_SOURCE_NAME $REPOSITORY_NAME/bin/Release/$REPOSITORY_NAME.$(cat $REPOSITORY_NAME/VERSION).symbols.nupkg + dotnet nuget push -k $GITEA_PAT --source $REPOSITORY_SOURCE_NAME $REPOSITORY_NAME/bin/Release/$REPOSITORY_NAME.$(cat $REPOSITORY_NAME/VERSION).nupkg + dotnet nuget push -k $GITEA_PAT --source $REPOSITORY_SOURCE_NAME $REPOSITORY_NAME/bin/Release/$REPOSITORY_NAME.$(cat $REPOSITORY_NAME/VERSION).symbols.nupkg