Skip to content

Commit d91e655

Browse files
authored
Pre-release v1.0.0 alpha
Prerelease v1.0.0 alpha
1 parent bd4a846 commit d91e655

File tree

7 files changed

+266
-65
lines changed

7 files changed

+266
-65
lines changed

.github/workflows/PR-CI.yml

Lines changed: 26 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ on:
66
- "**/*.md"
77
- "**/*.gitignore"
88
- "**/*.gitattributes"
9+
910
jobs:
1011
Run-Lint:
1112
runs-on: ubuntu-latest
1213
env:
1314
github-token: '${{ secrets.GH_Packages }}'
1415
steps:
1516
- name: Step-01 Checkout code
16-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1718
with:
1819
fetch-depth: 0
1920
- name: Step-02 Lint Code Base
@@ -23,99 +24,61 @@ jobs:
2324
FILTER_REGEX_INCLUDE: .*src/.*
2425
DEFAULT_BRANCH: master
2526
GITHUB_TOKEN: '${{ env.github-token }}'
27+
2628
Build-Test:
2729
runs-on: ubuntu-latest
2830
outputs:
29-
release_Version: ${{ steps.gitversion.outputs.MajorMinorPatch }}
30-
beta_Version: ${{ steps.gitversion.outputs.nuGetVersion }}
31-
branchName: ${{ steps.gitversion.outputs.branchName }}
31+
nuGetVersion: ${{ steps.gitversion.outputs.NuGetVersion }}
32+
majorMinorPatch: ${{ steps.gitversion.outputs.MajorMinorPatch }}
33+
fullSemVer: ${{ steps.gitversion.outputs.FullSemVer }}
34+
branchName: ${{ steps.gitversion.outputs.BranchName }}
3235
env:
33-
working-directory: /home/runner/work/sourceflow.net/sourceflow.net
36+
working-directory: ${{ github.workspace }}
3437

3538
steps:
3639
- name: Step-01 Install GitVersion
37-
uses: gittools/actions/gitversion/[email protected].7
40+
uses: gittools/actions/gitversion/[email protected].15
3841
with:
3942
versionSpec: 5.x
4043

4144
- name: Step-02 Check out Code
4245
uses: actions/checkout@v4
4346
with:
4447
fetch-depth: 0
48+
ref: ${{ github.event.pull_request.head.sha }}
4549

4650
- name: Step-03 Calculate Version
4751
id: gitversion
48-
uses: gittools/actions/gitversion/[email protected].7
52+
uses: gittools/actions/gitversion/[email protected].15
4953
with:
5054
useConfigFile: true
5155

52-
- name: Step-04 Install .NET
56+
- name: Step-04 Display Version Info
57+
run: |
58+
echo "NuGetVersion: ${{ steps.gitversion.outputs.NuGetVersion }}"
59+
echo "FullSemVer: ${{ steps.gitversion.outputs.FullSemVer }}"
60+
echo "BranchName: ${{ steps.gitversion.outputs.BranchName }}"
61+
62+
- name: Step-05 Install .NET
5363
uses: actions/setup-dotnet@v3
5464
with:
5565
dotnet-version: 9.0.x
5666

57-
- name: Step-05 Restore dependencies
67+
- name: Step-06 Restore dependencies
5868
run: dotnet restore
5969
working-directory: '${{ env.working-directory }}'
6070

61-
- name: Step-06 Build Version (Beta)
62-
if: ${{ !startsWith(github.head_ref, 'release/')}}
63-
run: dotnet build --configuration Release --no-restore -p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersion }}
64-
working-directory: '${{ env.working-directory }}'
65-
66-
- name: Step-06 Build Version (Release)
67-
if: ${{ startsWith(github.head_ref, 'release/')}}
68-
run: dotnet build --configuration Release --no-restore -p:PackageVersion=${{ steps.gitversion.outputs.MajorMinorPatch }}
71+
- name: Step-07 Build Version (Beta)
72+
run: dotnet build --configuration Release --no-restore -p:PackageVersion=${{ steps.gitversion.outputs.NuGetVersion }}
6973
working-directory: '${{ env.working-directory }}'
7074

71-
- name: Step-07 Test Solution
72-
run: dotnet test --configuration Release --no-build --no-restore --verbosity normal
75+
- name: Step-08 Test Solution
76+
run: dotnet test --configuration Release --no-build --no-restore --verbosity normal
7377
working-directory: '${{ env.working-directory }}'
7478

75-
- name: Step-08 Upload Build Artifacts
79+
- name: Step-09 Upload Build Artifacts
7680
uses: actions/upload-artifact@v4
7781
with:
7882
name: build-artifact
79-
path: ${{env.working-directory}}
80-
retention-days: 1
81-
82-
Package:
83-
needs: [Build-Test]
84-
runs-on: ubuntu-latest
85-
outputs:
86-
semVersion: ${{ needs.Build-Release.outputs.semVersion }}
87-
env:
88-
github-token: '${{ secrets.GH_Packages }}'
89-
nuget-token: '${{ secrets.NUGET_API_KEY }}'
90-
working-directory: /home/runner/work/sourceflow.net/sourceflow.net
91-
steps:
92-
- name: Step-01 Retrieve Build Artifacts
93-
uses: actions/download-artifact@v4
94-
with:
95-
name: build-artifact
96-
path: ${{env.working-directory}}
97-
98-
- name: Step-02 Install Github Packages
99-
run: dotnet tool install gpr --global
100-
101-
- name: Step-03 Publish to Github Packages
102-
run: find -name "*.nupkg" -print -exec gpr push -k ${{env.github-token}} {} \;
103-
104-
Release:
105-
name: Release to Nuget
106-
needs: [Package]
107-
if: ${{ startsWith(github.head_ref, 'release/')}}
108-
runs-on: ubuntu-latest
109-
env:
110-
nuget-token: '${{ secrets.NUGET_API_KEY }}'
111-
working-directory: /home/runner/work/sourceflow.net/sourceflow.net
112-
steps:
113-
- name: Step-01 Retrieve Build Artifacts
114-
uses: actions/download-artifact@v4
115-
with:
116-
name: build-artifact
117-
path: ${{env.working-directory}}
118-
- name: Step-03 Release to Nuget Org
119-
if: ${{ startsWith(github.head_ref, 'release/')}}
120-
run: dotnet nuget push ${{env.working-directory}}/src/parsley/bin/Release/*.nupkg --skip-duplicate --api-key ${{ env.nuget-token }} --source https://api.nuget.org/v3/index.json
121-
83+
path: ${{ env.working-directory }}
84+
retention-days: 1

.github/workflows/Pre-release-CI.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
permissions:
2+
contents: read
3+
name: pre-release-ci
4+
on:
5+
push:
6+
branches:
7+
- pre-release/**
8+
- pre-release
9+
10+
jobs:
11+
Build-Test-Publish:
12+
runs-on: ubuntu-latest
13+
env:
14+
working-directory: ${{ github.workspace }}
15+
github-token: '${{ secrets.GH_Packages }}'
16+
nuget-token: '${{ secrets.NUGET_API_KEY }}'
17+
18+
steps:
19+
- name: Step-01 Install GitVersion
20+
uses: gittools/actions/gitversion/[email protected]
21+
with:
22+
versionSpec: 5.x
23+
24+
- name: Step-02 Check out Code
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Step-03 Calculate Version
30+
id: gitversion
31+
uses: gittools/actions/gitversion/[email protected]
32+
with:
33+
useConfigFile: true
34+
35+
- name: Step-04 Display Version Info
36+
run: |
37+
echo "NuGetVersion: ${{ steps.gitversion.outputs.NuGetVersion }}"
38+
echo "FullSemVer: ${{ steps.gitversion.outputs.FullSemVer }}"
39+
echo "BranchName: ${{ steps.gitversion.outputs.BranchName }}"
40+
41+
- name: Step-05 Install .NET
42+
uses: actions/setup-dotnet@v3
43+
with:
44+
dotnet-version: 9.0.x
45+
46+
- name: Step-06 Restore dependencies
47+
run: dotnet restore
48+
working-directory: '${{ env.working-directory }}'
49+
50+
- name: Step-07 Build Version (Alpha)
51+
run: dotnet build --configuration Release --no-restore -p:PackageVersion=${{ steps.gitversion.outputs.NuGetVersion }}
52+
working-directory: '${{ env.working-directory }}'
53+
54+
- name: Step-08 Test Solution
55+
run: dotnet test --configuration Release --no-build --no-restore --verbosity normal
56+
working-directory: '${{ env.working-directory }}'
57+
58+
- name: Step-09 Create NuGet Package
59+
run: dotnet pack --configuration Release --no-build --output ./packages -p:PackageVersion=${{ steps.gitversion.outputs.NuGetVersion }}
60+
working-directory: '${{ env.working-directory }}'
61+
62+
- name: Step-10 Publish to Github Packages
63+
run: |
64+
dotnet tool install gpr --global
65+
find ./packages -name "*.nupkg" -print -exec gpr push -k ${{ env.github-token }} {} \;
66+
working-directory: '${{ env.working-directory }}'
67+
68+
- name: Step-11 Publish to NuGet.org (for release pre-releases)
69+
if: ${{ env.nuget-token != '' && contains(github.ref, 'pre-release/v') }}
70+
run: |
71+
find ./packages -name "*.nupkg" -print -exec dotnet nuget push {} --skip-duplicate --api-key ${{ env.nuget-token }} --source https://api.nuget.org/v3/index.json \;
72+
working-directory: '${{ env.working-directory }}'

.github/workflows/Release-CI.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: release-ci
2+
on:
3+
push:
4+
branches:
5+
- release/**
6+
- release
7+
8+
permissions:
9+
contents: read
10+
jobs:
11+
Build-Test-Publish:
12+
runs-on: ubuntu-latest
13+
env:
14+
working-directory: ${{ github.workspace }}
15+
github-token: '${{ secrets.GH_Packages }}'
16+
nuget-token: '${{ secrets.NUGET_API_KEY }}'
17+
18+
steps:
19+
- name: Step-01 Install GitVersion
20+
uses: gittools/actions/gitversion/[email protected]
21+
with:
22+
versionSpec: 5.x
23+
24+
- name: Step-02 Check out Code
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Step-03 Calculate Version
30+
id: gitversion
31+
uses: gittools/actions/gitversion/[email protected]
32+
with:
33+
useConfigFile: true
34+
35+
- name: Step-04 Display Version Info
36+
run: |
37+
echo "NuGetVersion: ${{ steps.gitversion.outputs.NuGetVersion }}"
38+
echo "FullSemVer: ${{ steps.gitversion.outputs.FullSemVer }}"
39+
echo "MajorMinorPatch: ${{ steps.gitversion.outputs.MajorMinorPatch }}"
40+
echo "BranchName: ${{ steps.gitversion.outputs.BranchName }}"
41+
42+
- name: Step-05 Install .NET
43+
uses: actions/setup-dotnet@v3
44+
with:
45+
dotnet-version: 9.0.x
46+
47+
- name: Step-06 Restore dependencies
48+
run: dotnet restore
49+
working-directory: '${{ env.working-directory }}'
50+
51+
- name: Step-07 Build Version (Stable)
52+
run: dotnet build --configuration Release --no-restore -p:PackageVersion=${{ steps.gitversion.outputs.MajorMinorPatch }}
53+
working-directory: '${{ env.working-directory }}'
54+
55+
- name: Step-08 Test Solution
56+
run: dotnet test --configuration Release --no-build --no-restore --verbosity normal
57+
working-directory: '${{ env.working-directory }}'
58+
59+
- name: Step-09 Create NuGet Package
60+
run: dotnet pack --configuration Release --no-build --output ./packages -p:PackageVersion=${{ steps.gitversion.outputs.MajorMinorPatch }}
61+
working-directory: '${{ env.working-directory }}'
62+
63+
- name: Step-10 Publish to Github Packages
64+
run: |
65+
dotnet tool install gpr --global
66+
find ./packages -name "*.nupkg" -print -exec gpr push -k ${{ env.github-token }} {} \;
67+
working-directory: '${{ env.working-directory }}'
68+
69+
- name: Step-11 Publish to NuGet.org
70+
if: ${{ env.nuget-token != '' }}
71+
run: |
72+
find ./packages -name "*.nupkg" -print -exec dotnet nuget push {} --skip-duplicate --api-key ${{ env.nuget-token }} --source https://api.nuget.org/v3/index.json \;
73+
working-directory: '${{ env.working-directory }}'

GitVersion.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
next-version: 1.0.0
2+
tag-prefix: '[vV]'
3+
mode: ContinuousDeployment
4+
branches:
5+
master:
6+
regex: ^master$|^main$
7+
tag: ''
8+
source-branches: ['develop']
9+
release:
10+
mode: ContinuousDelivery
11+
tag: beta
12+
increment: Minor
13+
prevent-increment-of-merged-branch-version: true
14+
source-branches: ['master', 'develop']
15+
pre-release:
16+
regex: ^pre-release$|^pre-release/.*
17+
tag: alpha
18+
increment: Minor
19+
prevent-increment-of-merged-branch-version: true
20+
source-branches: ['master', 'develop']
21+
develop:
22+
regex: ^develop$|^dev$
23+
tag: beta
24+
increment: Minor
25+
source-branches: ['master']
26+
pull-request:
27+
tag: beta
28+
regex: ^(pull|pull\-requests|pr)[/-]
29+
source-branches: ['master', 'develop', 'release', 'pre-release']
30+
feature:
31+
tag: '{BranchName}'
32+
increment: Inherit
33+
source-branches: ['master', 'develop', 'release']
34+
ignore:
35+
sha: []

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
# <img src="https://github.com/CodeShayk/SourceFlow.Net/blob/master/Images/ninja-icon-16.png" alt="ninja" style="width:30px;"/> SourceFlow.Net
1+
# <img src="https://github.com/CodeShayk/SourceFlow.Net/blob/master/Images/ninja-icon-16.png" alt="ninja" style="width:30px;"/> SourceFlow.Net
22
[![NuGet version](https://badge.fury.io/nu/SourceFlow.Net.svg)](https://badge.fury.io/nu/SourceFlow.Net)
33
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/CodeShayk/SourceFlow.Net/blob/master/LICENSE.md)
44
[![GitHub Release](https://img.shields.io/github/v/release/CodeShayk/SourceFlow.Net?logo=github&sort=semver)](https://github.com/CodeShayk/SourceFlow.Net/releases/latest)
55
[![master-build](https://github.com/CodeShayk/SourceFlow.Net/actions/workflows/Master-Build.yml/badge.svg)](https://github.com/CodeShayk/SourceFlow.Net/actions/workflows/Master-Build.yml)
66
[![master-codeql](https://github.com/CodeShayk/SourceFlow.Net/actions/workflows/Master-CodeQL.yml/badge.svg)](https://github.com/CodeShayk/SourceFlow.Net/actions/workflows/Master-CodeQL.yml)
77
[![.Net 9.0](https://img.shields.io/badge/.Net-9.0-blue)](https://dotnet.microsoft.com/en-us/download/dotnet/9.0)
88
[![.Net Standard 2.1](https://img.shields.io/badge/.NetStandard-2.1-blue)](https://github.com/dotnet/standard/blob/v2.1.0/docs/versions/netstandard2.1.md)
9+
[![.Net Standard 2.0](https://img.shields.io/badge/.NetStandard-2.0-blue)](https://github.com/dotnet/standard/blob/v2.0.0/docs/versions/netstandard2.0.md)
10+
[![.Net Framework 4.6.2](https://img.shields.io/badge/.Net-4.6.2-blue)](https://dotnet.microsoft.com/en-us/download/dotnet-framework/net46)
911

1012
<p align="center"> </p>
1113
<p align="center">
@@ -17,7 +19,6 @@
1719
## Overview
1820
SourceFlow.Net empowers developers to build scalable, maintainable applications by providing a complete toolkit for event sourcing, domain modeling, and command/query separation. Built from the ground up for .NET 9.0 with **performance** and **developer experience** as core priorities.
1921

20-
## Why SourceFlow.Net?
2122
### Key Features
2223
* 🏗️ Domain-Driven Design Support
2324
* ⚡ CQRS Implementation with Command/Query Segregation

SourceFlow.Net.sln

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ EndProject
1010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "misc", "misc", "{4F977993-F413-4BA5-809B-6688EC654606}"
1111
ProjectSection(SolutionItems) = preProject
1212
.gitignore = .gitignore
13+
GitVersion.yml = GitVersion.yml
1314
LICENSE = LICENSE
1415
README.md = README.md
1516
EndProjectSection
@@ -26,6 +27,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "github", "github", "{F81A2C
2627
.github\workflows\Master-CodeQL.yml = .github\workflows\Master-CodeQL.yml
2728
.github\workflows\PR-CI.yml = .github\workflows\PR-CI.yml
2829
.github\workflows\PR-CodeQL.yml = .github\workflows\PR-CodeQL.yml
30+
.github\workflows\Pre-release-CI.yml = .github\workflows\Pre-release-CI.yml
31+
.github\workflows\Release-CI.yml = .github\workflows\Release-CI.yml
2932
EndProjectSection
3033
EndProject
3134
Global

0 commit comments

Comments
 (0)