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