40 lines
1.0 KiB
YAML
40 lines
1.0 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/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
|
|
env:
|
|
CI_TOKEN: ${{ secrets.CI_TOKEN }}
|
|
run: |
|
|
dotnet nuget push out/*.nupkg \
|
|
--api-key "$CI_TOKEN" \
|
|
--source "https://gitea.masita.net/api/packages/mc/nuget/index.json" |