Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
Split 'nuget' github workflow into N items (WorkflowCore and dependen…
Browse files Browse the repository at this point in the history
…t packages)
  • Loading branch information
dgusev-dodo committed Feb 22, 2024
1 parent f5ca266 commit 1a86db3
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 60 deletions.
60 changes: 0 additions & 60 deletions .github/workflows/nuget.yml

This file was deleted.

44 changes: 44 additions & 0 deletions .github/workflows/nuget_dsl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Publish CVM WorkflowCore

on:
push:
tags:
- "ReleaseWorkflowCoreDsl/**"

jobs:
publish:
runs-on: ubuntu-latest
env:
DOTNET_VERSION: '6.0.x'
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
ARTIFACTS_DIR: './artifacts/nuget/cvm.workflowcore'
PROJECT: 'src/WorkflowCore.DSL/WorkflowCore.DSL.csproj'
PKG_NAME: 'WorkflowCore.DSL'

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Extract version from tag
id: extract_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\/ReleaseWorkflowCoreDsl\//}" >> $GITHUB_OUTPUT

- name: Restore dependencies
run: dotnet restore

- name: Build '${{ env.PKG_NAME }}'
run: dotnet build ${{ env.PROJECT }} --configuration Release -p:Version=${{ steps.extract_version.outputs.VERSION }} --no-restore

- name: Pack '${{ env.PKG_NAME }}'
run: dotnet pack ${{ env.PROJECT }} --configuration Release --output ${{ env.ARTIFACTS_DIR }} -p:PackageId="Dodo.Cvm.${{ env.PKG_NAME }}" -p:Version=${{ steps.extract_version.outputs.VERSION }} --no-build

- name: Push NuGet Packages
run: dotnet nuget push ${{ env.ARTIFACTS_DIR }}/*.nupkg --source ${{ secrets.NUGET_SOURCE }} --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
44 changes: 44 additions & 0 deletions .github/workflows/nuget_persistence_mongodb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Publish CVM WorkflowCore

on:
push:
tags:
- "ReleaseWorkflowCorePersistenceMongoDB/**"

jobs:
publish:
runs-on: ubuntu-latest
env:
DOTNET_VERSION: '6.0.x'
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
ARTIFACTS_DIR: './artifacts/nuget/cvm.workflowcore'
PROJECT: 'src/providers/WorkflowCore.Persistence.MongoDB/WorkflowCore.Persistence.MongoDB.csproj'
PKG_NAME: 'WorkflowCore.Persistence.MongoDB'

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Extract version from tag
id: extract_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\/ReleaseWorkflowCorePersistenceMongoDB\//}" >> $GITHUB_OUTPUT

- name: Restore dependencies
run: dotnet restore

- name: Build '${{ env.PKG_NAME }}'
run: dotnet build ${{ env.PROJECT }} --configuration Release -p:Version=${{ steps.extract_version.outputs.VERSION }} --no-restore

- name: Pack '${{ env.PKG_NAME }}'
run: dotnet pack ${{ env.PROJECT }} --configuration Release --output ${{ env.ARTIFACTS_DIR }} -p:PackageId="Dodo.Cvm.${{ env.PKG_NAME }}" -p:Version=${{ steps.extract_version.outputs.VERSION }} --no-build

- name: Push NuGet Packages
run: dotnet nuget push ${{ env.ARTIFACTS_DIR }}/*.nupkg --source ${{ secrets.NUGET_SOURCE }} --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
44 changes: 44 additions & 0 deletions .github/workflows/nuget_workflowcore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Publish CVM WorkflowCore

on:
push:
tags:
- "ReleaseWorkflowCore/**"

jobs:
publish:
runs-on: ubuntu-latest
env:
DOTNET_VERSION: '6.0.x'
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
ARTIFACTS_DIR: './artifacts/nuget/cvm.workflowcore'
PROJECT: 'src/WorkflowCore/WorkflowCore.csproj'
PKG_NAME: 'WorkflowCore'

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Extract version from tag
id: extract_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\/ReleaseWorkflowCore\//}" >> $GITHUB_OUTPUT

- name: Restore dependencies
run: dotnet restore

- name: Build '${{ env.PKG_NAME }}'
run: dotnet build ${{ env.PROJECT }} --configuration Release -p:Version=${{ steps.extract_version.outputs.VERSION }} --no-restore

- name: Pack '${{ env.PKG_NAME }}'
run: dotnet pack ${{ env.PROJECT }} --configuration Release --output ${{ env.ARTIFACTS_DIR }} -p:PackageId="Dodo.Cvm.${{ env.PKG_NAME }}" -p:Version=${{ steps.extract_version.outputs.VERSION }} --no-build

- name: Push NuGet Packages
run: dotnet nuget push ${{ env.ARTIFACTS_DIR }}/*.nupkg --source ${{ secrets.NUGET_SOURCE }} --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate

0 comments on commit 1a86db3

Please sign in to comment.