Skip to content

Commit ab941b2

Browse files
Merge pull request #30 from JustinianErdmier/feature/core/#23
fix(💚): fix ci/cd #23
2 parents a2dd802 + 27cd769 commit ab941b2

File tree

4 files changed

+63
-15
lines changed

4 files changed

+63
-15
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22

33
on:
44
workflow_dispatch:
5-
push:
6-
branches: [ main ]
75
pull_request:
8-
branches: [ main ]
6+
branches:
7+
- release/*
98

109
jobs:
1110
build:
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: publish Erdmier.DomainCore.Mediator to NuGet
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
branches:
6+
- release/mediator # Your default release branch
7+
paths:
8+
- 'Source/MediatorCore/**'
9+
jobs:
10+
publish:
11+
name: list Erdmier.DomainCore.Mediator on nuget.org
12+
runs-on: windows-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
# Required for a specific dotnet version that doesn't come with ubuntu-latest / windows-latest
17+
# Visit bit.ly/2synnZl to see the list of SDKs that are pre-installed with ubuntu-latest / windows-latest
18+
- name: Setup .NET Core
19+
uses: actions/setup-dotnet@v4
20+
with:
21+
dotnet-version: |
22+
8.0.x
23+
9.0.x
24+
25+
# Publish
26+
- name: publish on version change
27+
uses: alirezanet/[email protected]
28+
with:
29+
PROJECT_FILE_PATH: Source/MediatorCore/MediatorCore.csproj # Relative to the repository root
30+
VERSION_FILE_PATH: Source/MediatorCore/MediatorCore.csproj # Filepath with version info, relative to the repository root. Defaults to the project file.
31+
VERSION_REGEX: <Version>(.*)<\/Version> # Regex pattern to extract version info in a capturing group
32+
TAG_COMMIT: true # Flag to enable / disable git tagging
33+
TAG_FORMAT: MediatorCore-v* # Format of the git tag, [*] gets replaced with the version
34+
NUGET_KEY: ${{secrets.NUGET_API_KEY}} # nuget.org API key
35+
# This merged the branch being merged into the release branch into main - it did not merge the release branch itself into main
36+
# sync-branches:
37+
# runs-on: ubuntu-latest
38+
# steps:
39+
# - uses: actions/checkout@v4
40+
#
41+
# - name: merge release into main
42+
# uses: devmasx/merge-branch@master
43+
# with:
44+
# type: now
45+
# target_branch: main
46+
# message: Merge release/core into main
47+
# github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/publish.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,16 @@ jobs:
3232
TAG_COMMIT: true # Flag to enable / disable git tagging
3333
TAG_FORMAT: DomainCore-v* # Format of the git tag, [*] gets replaced with the version
3434
NUGET_KEY: ${{secrets.NUGET_API_KEY}} # nuget.org API key
35-
sync-branches:
36-
runs-on: ubuntu-latest
37-
steps:
38-
- uses: actions/checkout@v4
39-
40-
- name: merge release into main
41-
uses: devmasx/merge-branch@master
42-
with:
43-
type: now
44-
target_branch: main
45-
message: Merge release/core into main
46-
github_token: ${{ secrets.GITHUB_TOKEN }}
35+
# This merged the branch being merged into the release branch into main - it did not merge the release branch itself into main
36+
# sync-branches:
37+
# runs-on: ubuntu-latest
38+
# steps:
39+
# - uses: actions/checkout@v4
40+
#
41+
# - name: merge release into main
42+
# uses: devmasx/merge-branch@master
43+
# with:
44+
# type: now
45+
# target_branch: main
46+
# message: Merge release/core into main
47+
# github_token: ${{ secrets.GITHUB_TOKEN }}

Erdmier.DomainCore.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
2424
ProjectSection(SolutionItems) = preProject
2525
.github\workflows\build.yml = .github\workflows\build.yml
2626
.github\workflows\publish.yml = .github\workflows\publish.yml
27+
.github\workflows\publish-mediator.yml = .github\workflows\publish-mediator.yml
2728
EndProjectSection
2829
EndProject
2930
Global

0 commit comments

Comments
 (0)