Skip to content

Merge pull request #6 from deeplay-io/feature/add-keep-alive-overload… #17

Merge pull request #6 from deeplay-io/feature/add-keep-alive-overload…

Merge pull request #6 from deeplay-io/feature/add-keep-alive-overload… #17

Workflow file for this run

name: ci
on:
push:
tags:
- "nuget-*"
- "release-*"
jobs:
build-lib:
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
source-url: https://nuget.pkg.github.com/deeplay-io/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Get the tag
id: get_tag
run: echo ::set-output name=NUGET_APPEND_TAG::$( echo ${GITHUB_REF#refs/tags/} | cut -d "-" -f 2- )
if: startsWith(github.ref, 'refs/tags/nuget-')
- name: Append version
run: sed -i -E "s/.*<Version>(.+)<\/Version>.*/<Version>\1-${NUGET_APPEND_TAG}<\/Version>/" ./dotnet-etcd/dotnet-etcd.csproj
env:
NUGET_APPEND_TAG: ${{ steps.get_tag.outputs.NUGET_APPEND_TAG }}
if: startsWith(github.ref, 'refs/tags/nuget-')
- name: Build solution
run: dotnet build ./dotnet-etcd/ -c Release
- name: Build solution Generate NuGet package
run: dotnet pack ./dotnet-etcd/ -c Release -o out
- name: Push generated package to GitHub registry
run: dotnet nuget push ./out/*.nupkg --skip-duplicate --no-symbols -k ${GITHUB_TOKEN}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push generated package to Artifactory.dev
run: dotnet nuget push ./out/*.nupkg --skip-duplicate --no-symbols --source https://artifactory.dev.deeplay.io/artifactory/api/nuget/trn-nuget-dev/dotnet-etcd --api-key ${ARTIFACTORY_API}
env:
ARTIFACTORY_API: ${{ secrets.ARTIFACTORY_DEV_API }}