name: build nuget workflow for TelegramBotBase project on: push: branches: - master jobs: Build-TelegramBotBase: env: APP_PROJECT_NAME: TelegramBotBase PACKAGE_VERSION: "123.1.3" strategy: matrix: os: - linux # - win arch: - x64 #- x32 #- arch64 runs-on: [ "${{ matrix.os }}" ] steps: - name: Check out repository code uses: actions/checkout@v4 - name: Setup dotnet uses: actions/setup-dotnet@v3 with: dotnet-version: '8.0.x' - name: Restore dependencies run: dotnet restore $APP_PROJECT_NAME /p:Version=$PACKAGE_VERSION - name: Build app run: dotnet build -c Release --version-suffix $PACKAGE_VERSION --no-restore $APP_PROJECT_NAME /p:Version=$PACKAGE_VERSION - name: Pack app run: dotnet pack --no-build $APP_PROJECT_NAME /p:Version=$PACKAGE_VERSION - name: disconnect old source run: dotnet nuget remove source gitea continue-on-error: true - name: Connect source run: dotnet nuget add source --name gitea https://git.kosyakmakc.ru/api/packages/kosyakmakc/nuget/index.json - name: Upload nuget package run: dotnet nuget push --source gitea --api-key ${{ secrets.kosyakmakc_nuget_publish }} ${{ gitea.workspace }}/${{ env.APP_PROJECT_NAME }}/bin/Release/$APP_PROJECT_NAME.$PACKAGE_VERSION.nupkg