diff --git a/.gitea/workflows/nuget.yaml b/.gitea/workflows/nuget.yaml index 15d9b15..d01ede6 100644 --- a/.gitea/workflows/nuget.yaml +++ b/.gitea/workflows/nuget.yaml @@ -1,18 +1,24 @@ -- name: Setup .NET Core - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - cache: true - source-url: https://git.mworkspace.cn/api/packages/GiteaActionsSample/nuget/index.json - env: - NUGET_AUTH_TOKEN: ${{secrets.GITEA_TOKEN}} -- name: Install dependencies - run: dotnet restore -- name: Build - run: dotnet build --configuration Release --no-restore -- name: Test - run: dotnet test --no-restore --verbosity normal -- name: Pack - run: dotnet pack -c Release -- name: Publish the package to Gitea - run: dotnet nuget push bin/Release/*.nupkg +name: dotnet-publish-nuget +on: [push] +jobs + Pack-And-Publish: + runs-on: ubuntu-latest + steps: + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 8.x + cache: true + source-url: https://git.mworkspace.cn/api/packages/GiteaActionsSample/nuget/index.json + env: + NUGET_AUTH_TOKEN: ${{secrets.GITEA_TOKEN}} + - name: Install dependencies + run: dotnet restore + - name: Build + run: dotnet build --configuration Release --no-restore + - name: Test + run: dotnet test --no-restore --verbosity normal + - name: Pack + run: dotnet pack -c Release + - name: Publish the package to Gitea + run: dotnet nuget push bin/Release/*.nupkg