modefy actions yaml

This commit is contained in:
Mingor(100757) 2024-08-27 16:57:41 +08:00
parent c265d03dc5
commit 6b5b1dad6d

View File

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