[#50] ci: Publish NuGet packages at git.frostfs.info
All checks were successful
DCO / DCO (pull_request) Successful in 23s
lint-build / dotnet8.0 (pull_request) Successful in 34s

Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
This commit is contained in:
Vitaliy Potyarkin 2025-03-13 11:19:34 +03:00
parent 98cfd82313
commit 3b8eb5b8da

View file

@ -0,0 +1,31 @@
on:
push:
workflow_dispatch:
jobs:
image:
name: Publish NuGet packages
runs-on: docker
container: git.frostfs.info/truecloudlab/env:dotnet-8.0
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build NuGet packages
run: dotnet build # TODO: this should create *.nupkg somewhere
- name: Publish NuGet packages
run: |-
dotnet nuget add source \
--name "$NUGET_REGISTRY" \
--username "$NUGET_REGISTRY_USER" \
--password "$NUGET_REGISTRY_PASSWORD" \
"$NUGET_REGISTRY_URL"
dotnet nuget push --source "$NUGET_REGISTRY" path/to/package.nupkg # TODO: I don't know what I'm doing %-)
env:
NUGET_REGISTRY: TrueCloudLab
NUGET_REGISTRY_URL: https://git.frostfs.info/api/packages/TrueCloudLab/nuget/index.json
NUGET_REGISTRY_USER: ${{secrets.NUGET_REGISTRY_USER}}
NUGET_REGISTRY_PASSWORD: ${{secrets.NUGET_REGISTRY_PASSWORD}}
if: >-
startsWith(github.ref, 'refs/tags/v') &&
(github.event_name == 'workflow_dispatch' || github.event_name == 'push')