Files
messengerapi.Client/.gitea/workflows/publish-nuget.yml
masiton 904b244e76
All checks were successful
Pack and Push NuGet Package / publish (push) Successful in 43s
Client library reviewed.
2025-07-05 03:29:44 +02:00

38 lines
1.1 KiB
YAML

name: Pack and Push NuGet Package
on:
push:
branches:
- main
jobs:
publish:
container:
image: mcr.microsoft.com/dotnet/sdk:9.0
steps:
- name: Install Node.js and dependencies
run: |
apt-get update
apt-get install -y curl gnupg
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
apt-get install -y nodejs git
- name: Checkout
uses: actions/checkout@v3
- name: Restore dependencies
run: dotnet restore ./code/MessengerApi.Client/MessengerApi.Client.csproj
- name: Build project
run: dotnet build ./code/MessengerApi.Client/MessengerApi.Client.csproj -c Release
- name: Pack NuGet Package
run: |
dotnet pack ./code/MessengerApi.Client/MessengerApi.Client.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/api/packages/${{ secrets.NUGET_PUBLISH_USERNAME }}/nuget/index.json"