[#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
3b8eb5b8da
1 changed files with 31 additions and 0 deletions
31
.forgejo/workflows/publish.yml
Normal file
31
.forgejo/workflows/publish.yml
Normal 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')
|
Loading…
Add table
Reference in a new issue