[#50] ci: Publish NuGet packages at git.frostfs.info
Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
This commit is contained in:
parent
98cfd82313
commit
9eb742da77
1 changed files with 36 additions and 0 deletions
36
.forgejo/workflows/publish.yml
Normal file
36
.forgejo/workflows/publish.yml
Normal file
|
@ -0,0 +1,36 @@
|
|||
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
|
||||
# `dotnet build` implies and replaces `dotnet pack` thanks to `GeneratePackageOnBuild`
|
||||
run: dotnet build
|
||||
|
||||
- name: Publish NuGet packages
|
||||
run: |-
|
||||
dotnet nuget add source \
|
||||
--name "$NUGET_REGISTRY" \
|
||||
--username "$NUGET_REGISTRY_USER" \
|
||||
--password "$NUGET_REGISTRY_PASSWORD" \
|
||||
--store-password-in-clear-text \
|
||||
"$NUGET_REGISTRY_URL"
|
||||
find -iname '*.nupkg' | grep . | xargs -d'\n' -t -n1 \
|
||||
dotnet nuget push --source "$NUGET_REGISTRY"
|
||||
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')
|
Loading…
Add table
Reference in a new issue