Skip to content

Commit 64255e6

Browse files
committed
feat(Solution): Implemented Serverless Workflow version 1.0.0-alpha1
Signed-off-by: Charles d'Avernas <[email protected]>
1 parent 6d27524 commit 64255e6

File tree

445 files changed

+10835
-17318
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

445 files changed

+10835
-17318
lines changed

Diff for: .editorconfig

+3-1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ dotnet_style_prefer_compound_assignment = true:suggestion
6666
dotnet_style_prefer_simplified_interpolation = true:suggestion
6767
dotnet_style_namespace_match_folder = true:suggestion
6868
dotnet_style_readonly_field = true:suggestion
69+
dotnet_style_prefer_collection_expression = when_types_loosely_match:suggestion
6970

7071
[*.cs]
7172
csharp_indent_labels = one_less_than_current
@@ -98,4 +99,5 @@ csharp_style_deconstructed_variable_declaration = true:suggestion
9899
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
99100
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
100101

101-
file_header_template = Copyright © 2023-Present The Serverless Workflow Specification Authors\n\nLicensed under the Apache License, Version 2.0 (the "License"),\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.
102+
file_header_template = Copyright © 2024-Present The Serverless Workflow Specification Authors\n\nLicensed under the Apache License, Version 2.0 (the "License"),\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.
103+
csharp_style_prefer_primary_constructors = true:suggestion

Diff for: .github/workflows/build-dotnet.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build .NET
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
paths-ignore:
7+
- '.github/**'
8+
- '**/*.md'
9+
- 'assets/**'
10+
- 'deployments/**'
11+
workflow_call:
12+
13+
env:
14+
SOLUTION: ./ServerlessWorkflow.Sdk.sln
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
dotnet-version: ['8.0.x' ]
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v3
26+
with:
27+
fetch-depth: 2
28+
29+
- name: Pull latest version tag
30+
if: github.event_name != 'pull_request'
31+
run: |
32+
git fetch
33+
git pull
34+
35+
- name: Setup .NET ${{ matrix.dotnet-version }}
36+
uses: actions/setup-dotnet@v2
37+
with:
38+
dotnet-version: ${{ matrix.dotnet-version }}
39+
40+
- name: Restore dependencies
41+
run: dotnet restore "${{ env.SOLUTION }}"
42+
43+
- name: Build
44+
run: dotnet build "${{ env.SOLUTION }}" --configuration Release --no-restore
45+
46+
- name: Cache build items
47+
if: github.event_name != 'pull_request'
48+
uses: actions/cache@v3
49+
id: build-dotnet-cache
50+
with:
51+
path: ./**/Release/*.nupkg
52+
key: build-dotnet-cache-${{ github.sha }}

Diff for: .github/workflows/ci-pipeline.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Continuous integration
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths-ignore:
7+
- '.github/**'
8+
- '**/*.md'
9+
- 'assets/**'
10+
- 'deployments/**'
11+
workflow_dispatch:
12+
13+
jobs:
14+
15+
#test:
16+
# # Skip if it's not running in the main branch of the `serverlessworkflow/sdk-net` repo
17+
# if: github.repository == 'serverlessworkflow/sdk-net' && github.ref_name == 'main'
18+
# uses: ./.github/serverlessworkflow/sdk-net/test-dotnet.yml
19+
# secrets: inherit
20+
21+
versioning:
22+
#needs: [test]
23+
if: github.repository == 'cloud-flows/sdk-net' && github.ref_name == 'main'
24+
uses: ./.github/workflows/versioning.yml
25+
secrets: inherit
26+
27+
build:
28+
needs: [versioning]
29+
uses: ./.github/workflows/build-dotnet.yml
30+
secrets: inherit
31+
32+
release:
33+
needs: [build]
34+
uses: ./.github/workflows/release.yml
35+
secrets: inherit

Diff for: .github/workflows/dotnet.yml

-24
This file was deleted.

Diff for: .github/workflows/publish.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Manual publish of .NET packages
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
env:
9+
SOLUTION: ./ServerlessWorkflow.Sdk.sln
10+
REGISTRY: ghcr.io
11+
12+
jobs:
13+
publish-packages:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Setup .NET
18+
uses: actions/setup-dotnet@v1
19+
with:
20+
dotnet-version: 8.0.x
21+
- name: Restore dependencies
22+
run: dotnet restore "${{ env.SOLUTION }}"
23+
- name: Build
24+
run: dotnet build "${{ env.SOLUTION }}" --configuration Release --no-restore
25+
- name: Push1
26+
run: dotnet nuget push "./src/*/bin/Release/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate

Diff for: .github/workflows/release.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
release:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v3
12+
with:
13+
fetch-depth: 0
14+
15+
- name: Pull latest version tag
16+
run: |
17+
git fetch
18+
git pull
19+
LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
20+
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
21+
echo "LATEST_VERSION=${LATEST_TAG:1}" >> $GITHUB_ENV
22+
23+
- name: Retrieve build items
24+
uses: actions/cache@v3
25+
id: build-dotnet-cache
26+
with:
27+
path: ./**/Release/*.nupkg
28+
key: build-dotnet-cache-${{ github.sha }}
29+
30+
- name: Release
31+
uses: softprops/action-gh-release@v1
32+
with:
33+
tag_name: ${{ env.LATEST_TAG }}
34+
name: ${{ env.LATEST_VERSION }}
35+
token: ${{ secrets.BOT_PAT }}
36+
generate_release_notes: true
37+
files: |
38+
LICENSE
39+
# other files will be appended during/after publish

Diff for: .github/workflows/test-dotnet.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Test .NET
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
paths-ignore:
7+
- '.github/**'
8+
- '**/*.md'
9+
- 'assets/**'
10+
- 'deployments/**'
11+
workflow_call:
12+
13+
env:
14+
SOLUTION: ./ServerlessWorkflow.Sdk.sln
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
dotnet-version: ['8.0.x' ]
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v3
26+
27+
- name: Setup .NET ${{ matrix.dotnet-version }}
28+
uses: actions/setup-dotnet@v2
29+
with:
30+
dotnet-version: ${{ matrix.dotnet-version }}
31+
32+
- name: Restore dependencies
33+
run: dotnet restore "${{ env.SOLUTION }}"
34+
35+
# - name: Test
36+
# run: dotnet test "${{ env.SOLUTION }}" --no-restore --verbosity normal"
37+
38+
# Test "per domain" for ease of readability
39+
- name: Test Core
40+
run: dotnet test "${{ env.SOLUTION }}" --no-restore --filter "FullyQualifiedName~Cases.Core"
41+
# ...

Diff for: .github/workflows/versioning.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Auto Versioning .NET
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
increment-version:
8+
runs-on: windows-latest
9+
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v3
13+
with:
14+
fetch-depth: 0
15+
token: ${{ secrets.BOT_PAT }}
16+
17+
- name: Reset Origin
18+
run: |
19+
git remote set-url origin "https://${{ secrets.BOT_USERNAME }}:${{ secrets.BOT_PAT }}@github.com/${{ github.repository }}.git"
20+
git checkout ${{ github.ref_name }}
21+
22+
- name: Install Versioning.NET
23+
run: |
24+
dotnet tool install --global Versioning.NET
25+
26+
- name: Increment Version
27+
run: |
28+
dotnet-version increment-version-with-git-hints -g "." --branch-name ${{ github.ref_name }} --author-email ${{ secrets.BOT_EMAIL }}

0 commit comments

Comments
 (0)