Carried over contracts.
All checks were successful
Pack and Push NuGet Package / publish (push) Successful in 44s
All checks were successful
Pack and Push NuGet Package / publish (push) Successful in 44s
This commit is contained in:
38
.gitea/workflows/publish-nuget.yml
Normal file
38
.gitea/workflows/publish-nuget.yml
Normal file
@ -0,0 +1,38 @@
|
||||
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.Contracts/MessengerApi.Contracts.csproj
|
||||
|
||||
- name: Build project
|
||||
run: dotnet build ./code/MessengerApi.Contracts/MessengerApi.Contracts.csproj -c Release
|
||||
|
||||
- name: Pack NuGet Package
|
||||
run: |
|
||||
dotnet pack ./code/MessengerApi.Contracts/MessengerApi.Contracts.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"
|
||||
Reference in New Issue
Block a user