Added gitea publish action.
Some checks failed
Pack and Push NuGet Package / publish (push) Failing after 46s
Some checks failed
Pack and Push NuGet Package / publish (push) Failing after 46s
This commit is contained in:
31
.gitea/workflows/publish-nuget.yml
Normal file
31
.gitea/workflows/publish-nuget.yml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
name: Pack and Push NuGet Package
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
container:
|
||||||
|
image: mcr.microsoft.com/dotnet/sdk:9.0
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Restore dependencies
|
||||||
|
run: dotnet restore ./code/portaloggy/portaloggy.csproj
|
||||||
|
|
||||||
|
- name: Build project
|
||||||
|
run: dotnet build ./code/portaloggy/portaloggy.csproj -c Release
|
||||||
|
|
||||||
|
- name: Pack NuGet Package
|
||||||
|
run: |
|
||||||
|
dotnet pack ./code/portaloggy/portaloggy.csproj -c Release -o out
|
||||||
|
|
||||||
|
- name: Push to Gitea NuGet Registry
|
||||||
|
run: |
|
||||||
|
dotnet nuget push out/*.nupkg \
|
||||||
|
--api-key "${{ secrets.NUGET_PUBLISH_TOKEN }}" \
|
||||||
|
--source "https://gitea.masita.net/mc/portaloggy/packages/${{ secrets.NUGET_PUBLISH_USERNAME }}/nuget/index.json"
|
||||||
Reference in New Issue
Block a user