Skip to content

Commit

Permalink
Merge pull request #5 from egbakou/cd/all
Browse files Browse the repository at this point in the history
chore(cd): added CD workflows
  • Loading branch information
egbakou authored Dec 18, 2023
2 parents 06f5cd0 + 47fb944 commit 77c3f29
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/cd-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CD DomainVerifier

on:
release:
types: [ published ]
workflow_dispatch:


jobs:
publish:
name: Pack & publish ${{ github.event.release.name }}
runs-on: ubuntu-latest
if: contains(github.event.release.name, 'core')

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Install .NET SDK 8.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x

- name: Pack
run: dotnet pack -c Release -o nupkgs
working-directory: ./src/DomainVerifier

- name: Publish NuGet package
run: dotnet nuget push ./nupkgs/*.nupkg --source $NUGET_API_URL --api-key $NUGET_API_KEY --skip-duplicate
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
NUGET_API_URL: https://api.nuget.org/v3/index.json
working-directory: ./src/DomainVerifier


36 changes: 36 additions & 0 deletions .github/workflows/cd-extensions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CD DomainVerifier.Extensions

on:
release:
types: [ published ]
workflow_dispatch:


jobs:
publish:
name: Pack & publish ${{ github.event.release.name }}
runs-on: ubuntu-latest
if: contains(github.event.release.name, 'extensions')
strategy:
matrix:
dotnet-version: [ '8.0.x', '7.0.x', '6.0.x' ]

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Install .NET SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet-version }}

- name: Pack
run: dotnet pack -c Release -o nupkgs
working-directory: ./src/DomainVerifier.Extensions

- name: Publish NuGet package
run: dotnet nuget push ./nupkgs/*.nupkg --source $NUGET_API_URL --api-key $NUGET_API_KEY --skip-duplicate
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
NUGET_API_URL: https://api.nuget.org/v3/index.json
working-directory: ./src/DomainVerifier.Extensions

0 comments on commit 77c3f29

Please sign in to comment.