-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from delegateas/pks/fixjobnames
Fixing JobNames
- Loading branch information
Showing
16 changed files
with
188 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: PreRelease | ||
|
||
on: | ||
push: | ||
branches: | ||
- releases/** | ||
|
||
jobs: | ||
release: | ||
name: Pre Releasing | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Add plugin for conventional commits | ||
run: npm install conventional-changelog-conventionalcommits | ||
working-directory: ./.github/workflows | ||
|
||
- name: Add plugin for executing bash commands | ||
run: npm install @semantic-release/exec -D | ||
working-directory: ./.github/workflows | ||
|
||
- name: Dry Run Semantic to get next Version nummber | ||
working-directory: ./.github/workflows | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
GIT_AUTHOR_NAME: thygesteffensen | ||
GIT_AUTHOR_EMAIL: [email protected] | ||
run: | | ||
echo "$(npx semantic-release --dry-run)" | ||
- name: Dry Run Semantic to get next Version nummber | ||
working-directory: ./.github/workflows | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
GIT_AUTHOR_NAME: thygesteffensen | ||
GIT_AUTHOR_EMAIL: [email protected] | ||
run: | | ||
echo "RELEASE_VERSION=$((npx semantic-release --dry-run).Where({ $_ -like '*Release note*' }) | Out-String | Select-String '[0-9]+\.[0-9]+\.[0-9]+([-][a-zA-z]+[.][0-9]*)?' | % { $_.Matches } | % { $_.Value })" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
- name: Print release verison | ||
run: echo ${env:RELEASE_VERSION} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System; | ||
|
||
namespace WorkflowEngine.Core | ||
{ | ||
public class ActionImplementationMetadata<T> : IActionImplementationMetadata | ||
where T: IActionImplementation | ||
{ | ||
public string Type { get; set; } | ||
public Type Implementation => typeof(T); | ||
} | ||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System.Threading.Tasks; | ||
|
||
namespace WorkflowEngine.Core | ||
{ | ||
public interface IActionImplementation | ||
{ | ||
|
||
|
||
ValueTask<object> ExecuteAsync(IWorkflow workflow, IAction action); | ||
|
||
|
||
} | ||
|
||
|
||
|
||
} |
17 changes: 17 additions & 0 deletions
17
src/WorkflowEngine.Core/IActionImplementationExtenssions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Microsoft.Extensions.DependencyInjection; | ||
|
||
namespace WorkflowEngine.Core | ||
{ | ||
public static class IActionImplementationExtenssions | ||
{ | ||
public static IServiceCollection AddAction<T>(this IServiceCollection services, string type) | ||
where T: class, IActionImplementation | ||
{ | ||
return services.AddTransient<T>() | ||
.AddSingleton< IActionImplementationMetadata>(new ActionImplementationMetadata<T> { Type = type }); | ||
} | ||
} | ||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
|
||
namespace WorkflowEngine.Core | ||
{ | ||
public interface IActionImplementationMetadata{ | ||
string Type { get; } | ||
Type Implementation { get; } | ||
} | ||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using Hangfire; | ||
using System.ComponentModel; | ||
using System.Threading.Tasks; | ||
using WorkflowEngine.Core; | ||
|
||
namespace WorkflowEngine | ||
{ | ||
public interface IHangfireActionExecutor | ||
{ | ||
[JobDisplayName("Action: {0}, workflow={1:Id}")] | ||
public ValueTask<object> ExecuteAsync(string type, IWorkflow workflow, IAction action); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using Hangfire; | ||
using System.ComponentModel; | ||
using System.Threading.Tasks; | ||
using WorkflowEngine.Core; | ||
|
||
namespace WorkflowEngine | ||
{ | ||
public interface IHangfireWorkflowExecutor | ||
{ | ||
[JobDisplayName("Trigger: {0:WorkFlow}")] | ||
public ValueTask<object> TriggerAsync(ITriggerContext context); | ||
} | ||
|
||
} |