Skip to content

Commit cd4ec5a

Browse files
authored
Merge pull request #1064 from eventflow/prepare-v1-1
v1: Prepare 1.1
2 parents 0a55bce + c621ae7 commit cd4ec5a

12 files changed

Lines changed: 88 additions & 277 deletions
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ jobs:
3131
uses: actions/setup-dotnet@v4
3232
with:
3333
dotnet-version: |
34-
2.1.x
3534
3.1.x
3635
6.0.x
36+
8.0.x
3737
3838
# Initializes the CodeQL tools for scanning.
3939
- name: Initialize CodeQL
Lines changed: 40 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,47 @@
1-
name: CI
1+
name: pipeline
22

33
on:
4-
push:
5-
branches: [ develop-v1 ]
6-
pull_request:
7-
branches: [ develop-v1 ]
4+
workflow_call:
5+
inputs:
6+
# REQUIRED ============================
7+
version:
8+
required: true
9+
type: string
10+
# OPTIONAL ============================
11+
bake-convention:
12+
required: false
13+
default: 'default'
14+
type: string
15+
bake-version:
16+
required: false
17+
type: string
18+
default: '0.30.43-beta'
19+
environment:
20+
required: false
21+
type: string
22+
default: 'develop'
23+
secrets:
24+
nuget-api-key:
25+
required: false
826

927
jobs:
1028
build:
11-
runs-on: ubuntu-20.04
29+
runs-on:
30+
- ubuntu-20.04
31+
32+
environment:
33+
name: ${{ inputs.environment }}
34+
1235
env:
1336
HELPZ_POSTGRESQL_PASS: Password12!
1437
EVENTFLOW_MSSQL_SERVER: 127.0.0.1,1433
1538
EVENTFLOW_MSSQL_USER: sa
16-
EVENTFLOW_MSSQL_PASS: Password12!
39+
EVENTFLOW_MSSQL_PASS: Password12!
40+
NUGET_APIKEY: ${{ secrets.nuget-api-key }}
1741

1842
services:
1943
rabbitmq:
20-
image: rabbitmq:3.12.0-management-alpine
44+
image: rabbitmq:3-management-alpine
2145
env:
2246
RABBITMQ_DEFAULT_USER: guest
2347
RABBITMQ_DEFAULT_PASS: guest
@@ -65,7 +89,7 @@ jobs:
6589
- name: Setup .NET
6690
uses: actions/setup-dotnet@v4
6791
with:
68-
dotnet-version:
92+
dotnet-version: |
6993
3.1.x
7094
6.0.x
7195
8.0.x
@@ -76,19 +100,20 @@ jobs:
76100

77101
# https://github.com/rasmus/Bake
78102
- name: Install Bake
79-
run: dotnet tool install -g --version 0.30.43-beta Bake
103+
run: dotnet tool install -g --version ${{ inputs.bake-version }} Bake
80104

81105
- name: Run Bake
82-
run: |
83-
declare -i REVISION
84-
REVISION=5000+$GITHUB_RUN_NUMBER
85-
bake run --build-version 1.0.$REVISION
86106
env:
87107
MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.GITHUB_TOKEN }}
108+
run: |
109+
bake run \
110+
--convention=${{ inputs.bake-convention }} \
111+
--build-version ${{ inputs.version }} \
112+
--destination="nuget>github,nuget,release>github"
88113
89114
- name: Upload NuGet packages
90115
uses: actions/upload-artifact@v4
91-
if: success() || failure()
116+
if: success()
92117
with:
93118
name: packages
94119
path: "**/*nupkg"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: pull-requests
2+
3+
on:
4+
push:
5+
branches: [ develop-v1 ]
6+
pull_request:
7+
branches: [ develop-v1 ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
pipeline:
14+
uses: ./.github/workflows/pipeline.yaml
15+
with:
16+
version: "1.1.0-pr${{ github.event.number }}-b${{ github.run_number }}"

.github/workflows/release.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: release
2+
3+
on:
4+
push:
5+
branches: [ release-v1 ]
6+
7+
permissions:
8+
contents: write
9+
packages: write
10+
11+
jobs:
12+
pipeline:
13+
uses: ./.github/workflows/pipeline.yaml
14+
with:
15+
bake-convention: 'Release'
16+
environment: 'release'
17+
version: "1.1.0"
18+
secrets:
19+
nuget-api-key: ${{ secrets.NUGET_APIKEY }}

.github/workflows/release.yml

Lines changed: 0 additions & 101 deletions
This file was deleted.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: Test report
1+
name: test reports
2+
23
on:
34
workflow_run:
45
workflows:
5-
- 'CI'
6-
- 'Release'
76
- 'pull-requests'
7+
- 'release'
88
types:
99
- completed
1010

Documentation/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ public class ExampleEvent : AggregateEvent<ExampleAggregate, ExampleId>
179179
}
180180
```
181181

182-
We have applied the `[EventVersion("example", 1)]` to our event, marking it as the `example` event version `1`, which directly corresponds to the `event_name` and `event_version` from the metadata stored alongside the event mentioned. The information is used by EventFlow to tie the name and version to a specific .NET type.
182+
We have applied the `[EventVersion("example", 1)]` to our event, marking it as the `example` event version `1`, which directly corresponds to the `event_name` and `event_version` from the metadata stored alongside the event mentioned. The information is used by EventFlow to tie the name and version to a specific .NET type. This is important when reading events from the event store as EventFlow needs to know which type to deserialize the event to. If an alternative default naming convention is needed, read our section on [event naming strategies](additional/event-naming-strategies.md).
183183

184184
!!! warning
185-
Even though using the `EventVersion` attribute is optional, it is **highly recommended**. EventFlow will infer the information if it isn't provided, thus making it vulnerable to type renames among other things.
185+
Even though using the `EventVersion` attribute is optional, it is **highly recommended**. EventFlow will infer the information if it isn't provided, thus making it vulnerable to type renames among other things. Read our section on [event naming strategies](additional/event-naming-strategies.md) if an alternative default naming convention is needed.
186186

187187
!!! danger
188188
Once you have aggregates in your production environment that have emitted an event, you should never change the .NET implementation of the event! You can deprecate it, but you should never change the type or the data stored in the event store. If the event type is changed, EventFlow will not be able to deserialize the event and can produce unexpected results when reading old aggregates.

RELEASE_NOTES.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
### New in 1.0 (not properly released yet)
1+
### New in 1.1.0 (not released yet)
2+
3+
* New: More control of event naming by introducing the interface `IEventNamingStrategy`, see the
4+
updated documentation at https://geteventflow.net/additional/event-naming-strategies/ for more
5+
information (thanks @SeWaS)
6+
7+
### New in 1.0.5007 (released 2024-11-16)
28

39
Read the complete migration guide to get the full list of changes as well as recommendations
410
on how to do the migration.

0 commit comments

Comments
 (0)