From b6edae42f65a449f1b4ceaf4438405dd9e27c524 Mon Sep 17 00:00:00 2001 From: Simon Diesenreiter Date: Wed, 27 Nov 2024 20:16:33 +0100 Subject: [PATCH] more fixes --- .gitea/workflows/release.yml | 21 ++++++++++++--------- .gitea/workflows/rename_project.yml | 7 +++++++ nuget.config | 11 +++++++++++ 3 files changed, 30 insertions(+), 9 deletions(-) create mode 100644 nuget.config diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 92528eb..81aafc5 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -45,18 +45,21 @@ jobs: pip install setuptools wheel twine - name: Check version match run: | - REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $2}' | tr '-' '_' | tr '[:upper:]' '[:lower:]') + REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $2}' | tr '-' '_'') if [ "$(cat $REPOSITORY_NAME/VERSION)" = "${GITHUB_REF_NAME:1}" ] ; then echo "Version matches successfully!" else echo "Version must match!" exit -1 fi - - name: Build and publish - env: - TWINE_USERNAME: gitearobot - TWINE_PASSWORD: ${{ secrets.PACKAGE_GITEA_PAT }} - run: | - REPOSITORY_OWNER=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $1}') - python setup.py sdist bdist_wheel - twine upload --repository-url https://git.disi.dev/api/packages/$REPOSITORY_OWNER/pypi dist/* + # - name: Build and publish + # env: + # GITEA_USERNAME: gitearobot + # GITEA_PASSWORD: ${{ secrets.PACKAGE_GITEA_PAT }} + # run: | + # REPOSITORY_OWNER=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $1}') + # REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $2}' | tr '-' '_'') + # dotnet nuget add source --name gitea --username $GITEA_USERNAME --password $GITEA_PASSWORD https://git.disi.dev/api/packages/$REPOSITORY_OWNER/nuget/index.json + # dotnet pack --include-symbols --include-source -p:PackageVersion=$(cat $REPOSITORY_NAME/VERSION) project_name.sln + # dotnet nuget push --source gitea $REPOSITORY_NAME/bin/Release/$REPOSITORY_NAME.$(cat $REPOSITORY_NAME/VERSION).nupkg + # dotnet nuget push --source gitea $REPOSITORY_NAME/bin/Release/$REPOSITORY_NAME.$(cat $REPOSITORY_NAME/VERSION).symbols.nupkg diff --git a/.gitea/workflows/rename_project.yml b/.gitea/workflows/rename_project.yml index dc1779a..88c56aa 100644 --- a/.gitea/workflows/rename_project.yml +++ b/.gitea/workflows/rename_project.yml @@ -34,6 +34,13 @@ jobs: run: | echo "Renaming the project with -a(author) ${{ env.REPOSITORY_OWNER }} -n(name) ${{ env.REPOSITORY_NAME }} -u(urlname) ${{ env.REPOSITORY_URLNAME }}" .gitea/rename_project.sh -a ${{ env.REPOSITORY_OWNER }} -n ${{ env.REPOSITORY_NAME }} -u ${{ env.REPOSITORY_URLNAME }} -d "Awesome ${{ env.REPOSITORY_NAME }} created by ${{ env.REPOSITORY_OWNER }}" + + - name: Remove renaming workflow + if: steps.is_template.outputs.is_template == 'true' + run: | + rm .gitea/template.yml + rm .gitea/workflows/rename_project.yml + rm .gitea/rename_project.sh - uses: stefanzweifel/git-auto-commit-action@v4 with: diff --git a/nuget.config b/nuget.config new file mode 100644 index 0000000..1550c4a --- /dev/null +++ b/nuget.config @@ -0,0 +1,11 @@ + + + + + + + + + + +