From c02824f63e391ff51ba53bafbaee4a947459e353 Mon Sep 17 00:00:00 2001 From: Meysam Hadeli <35596795+meysamhadeli@users.noreply.github.com> Date: Fri, 9 Dec 2022 17:19:01 +0330 Subject: [PATCH 01/18] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 5127951..bffd16d 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,6 @@ High-level plan is represented in the table - ✔️ **[`MongoDB.Driver`](https://github.com/mongodb/mongo-csharp-driver)** - .NET Driver for MongoDB. - ✔️ **[`xUnit.net`](https://github.com/xunit/xunit)** - A free, open source, community-focused unit testing tool for the .NET Framework. - ✔️ **[`Respawn`](https://github.com/jbogard/Respawn)** - Respawn is a small utility to help in resetting test databases to a clean state. -- ✔️ **[`Mongo2Go`](https://github.com/Mongo2Go/Mongo2Go)** - Providing multiple, temporary and isolated MongoDB databases for unit tests (or to be precise: integration tests). - ✔️ **[`Testcontainers`](https://github.com/testcontainers/testcontainers-dotnet)** - Testcontainers for .NET is a library to support tests with throwaway instances of Docker containers. ## The Domain And Bounded Context - Service Boundary From 6b840bd708653a1450af49ed613857625a4a4390 Mon Sep 17 00:00:00 2001 From: Meysam Hadeli <35596795+meysamhadeli@users.noreply.github.com> Date: Sat, 10 Dec 2022 02:59:56 +0330 Subject: [PATCH 02/18] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bffd16d..efdffdb 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ - :sparkle: Using `Event Store` for `write side` of Booking-Microservice to store all `historical state` of aggregate. - :sparkle: Using `Inbox Pattern` for ensuring message idempotency for receiver and `Exactly once Delivery`. - :sparkle: Using `Outbox Pattern` for ensuring no message is lost and there is at `Least One Delivery`. -- :sparkle: Using `Unit Testing`, `Integration Testing` for testing level. +- :sparkle: Using `Unit Testing`, `Integration Testing`, `End To End Testing` for testing level. - :sparkle: Using `Fluent Validation` and a `Validation Pipeline Behaviour` on top of `MediatR`. - :sparkle: Using `Minimal API` for all endpoints. - :sparkle: Using `Health Check` for reporting the health of app infrastructure components. From a215a95fd8282feca4a8054997ee0f33011dd21a Mon Sep 17 00:00:00 2001 From: Meysam Hadeli <35596795+meysamhadeli@users.noreply.github.com> Date: Tue, 20 Dec 2022 00:18:28 +0330 Subject: [PATCH 03/18] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index efdffdb..b48eeb8 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ - :sparkle: Using `gRPC` for internal communication between our microservices. - :sparkle: Using `CQRS` implementation with `MediatR` library. - :sparkle: Using `SqlServer` for `write side` of some microservices. -- :sparkle: Using `MongoDB` for `read side` of all microservices. +- :sparkle: Using `MongoDB` for `read side` of some microservices. - :sparkle: Using `Event Store` for `write side` of Booking-Microservice to store all `historical state` of aggregate. - :sparkle: Using `Inbox Pattern` for ensuring message idempotency for receiver and `Exactly once Delivery`. - :sparkle: Using `Outbox Pattern` for ensuring no message is lost and there is at `Least One Delivery`. From 8637a8e420ea1875d09a30aeadabc685b8610726 Mon Sep 17 00:00:00 2001 From: Meysam Hadeli <35596795+meysamhadeli@users.noreply.github.com> Date: Mon, 2 Jan 2023 21:55:25 +0330 Subject: [PATCH 04/18] Create release-please.yml --- .github/workflows/release-please.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/release-please.yml diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..bd31072 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,15 @@ +# https://github.com/google-github-actions/release-please-action#how-release-please-works +# https://www.conventionalcommits.org/en/v1.0.0/ +on: + push: + branches: + - main +name: release-please +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v3 + with: + release-type: go + package-name: release-please-action From b45ab90bb3b7c43913820e5cb20ccf7f89dc8fc6 Mon Sep 17 00:00:00 2001 From: Meysam Hadeli <35596795+meysamhadeli@users.noreply.github.com> Date: Tue, 3 Jan 2023 18:39:38 +0330 Subject: [PATCH 05/18] Create .gitpod.yml --- .gitpod.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .gitpod.yml diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..e0f5e65 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,15 @@ +image: + file: .gitpod.Dockerfile + +tasks: + - name: Restore & Build + init: | + dotnet dev-certs https + dotnet restore + dotnet build + - name: Run + command: dotnet run + +vscode: + extensions: + - muhammad-sammy.csharp From 49e96061fdb667c5cfe656a05173534d790b96b4 Mon Sep 17 00:00:00 2001 From: Meysam Hadeli <35596795+meysamhadeli@users.noreply.github.com> Date: Tue, 3 Jan 2023 18:40:22 +0330 Subject: [PATCH 06/18] Create .gitpod.Dockerfile --- .gitpod.Dockerfile | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitpod.Dockerfile diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile new file mode 100644 index 0000000..9c1e96b --- /dev/null +++ b/.gitpod.Dockerfile @@ -0,0 +1 @@ +FROM gitpod/workspace-dotnet:latest From f5f498b2782fbc984863e8a62c05a527f26c571f Mon Sep 17 00:00:00 2001 From: Meysam Hadeli <35596795+meysamhadeli@users.noreply.github.com> Date: Tue, 3 Jan 2023 19:08:25 +0330 Subject: [PATCH 07/18] Update .gitpod.yml --- .gitpod.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitpod.yml b/.gitpod.yml index e0f5e65..fca163d 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -2,6 +2,8 @@ image: file: .gitpod.Dockerfile tasks: + - name: Start containers + run: docker-compose -f "./deployments/docker-compose/infrastracture.yaml" up -d --build - name: Restore & Build init: | dotnet dev-certs https From 9b2b083557d1d1d205d26d2ee20cd7c14b9f3b58 Mon Sep 17 00:00:00 2001 From: Meysam Hadeli <35596795+meysamhadeli@users.noreply.github.com> Date: Tue, 3 Jan 2023 19:13:55 +0330 Subject: [PATCH 08/18] Update .gitpod.yml --- .gitpod.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitpod.yml b/.gitpod.yml index fca163d..f861a8c 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -3,7 +3,7 @@ image: tasks: - name: Start containers - run: docker-compose -f "./deployments/docker-compose/infrastracture.yaml" up -d --build + command: docker-compose -f "./deployments/docker-compose/infrastracture.yaml" up -d --build - name: Restore & Build init: | dotnet dev-certs https From efe071aedc5c4b9f6382448d19c7a73226ee5755 Mon Sep 17 00:00:00 2001 From: Meysam Hadeli <35596795+meysamhadeli@users.noreply.github.com> Date: Tue, 3 Jan 2023 21:22:36 +0330 Subject: [PATCH 09/18] Update .gitpod.yml --- .gitpod.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitpod.yml b/.gitpod.yml index f861a8c..f8d40f6 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -3,7 +3,10 @@ image: tasks: - name: Start containers - command: docker-compose -f "./deployments/docker-compose/infrastracture.yaml" up -d --build + init: | + docker-compose pull + - command: | + docker-compose -f ./deployments/docker-compose/infrastracture.yaml up -d - name: Restore & Build init: | dotnet dev-certs https @@ -15,3 +18,4 @@ tasks: vscode: extensions: - muhammad-sammy.csharp + - ms-azuretools.vscode-docker From 5b68b4f57ed8c1a27c6bfc56580d965102c01ad3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 3 Jan 2023 23:20:34 +0000 Subject: [PATCH 10/18] chore(main): release 1.3.0 --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..c93dc1f --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,11 @@ +# Changelog + +## [1.3.0](https://github.com/meysamhadeli/booking-microservices/compare/v1.2.0...v1.3.0) (2023-01-03) + + +### Features + +* Add health-options ([624194b](https://github.com/meysamhadeli/booking-microservices/commit/624194bb0161749281d1a3072ba7a93b7743a08e)) +* Add serilog sentry ([54471a1](https://github.com/meysamhadeli/booking-microservices/commit/54471a1128b4897ecdbd01cb384ceacef6b13165)) +* Change in docker files config ([c474890](https://github.com/meysamhadeli/booking-microservices/commit/c4748908b9a84d9bee50de11273023888544b24e)) +* Update all nuget packages ([edd50ac](https://github.com/meysamhadeli/booking-microservices/commit/edd50ac41a55ec2e62d506149a128f13475c3b7b)) From 9af3db8a9f9db59c700d06fb1ae710bd0036b997 Mon Sep 17 00:00:00 2001 From: Meysam Hadeli <35596795+meysamhadeli@users.noreply.github.com> Date: Thu, 5 Jan 2023 00:03:27 +0330 Subject: [PATCH 11/18] Update .gitpod.yml --- .gitpod.yml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index f8d40f6..53e3acf 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,21 +1,27 @@ +# https://github.com/gitpod-samples/template-dotnet-core-cli-csharp +# https://www.gitpod.io/docs/introduction/languages/dotnet +# https://github.com/gitpod-samples/template-docker-compose +# https://www.gitpod.io/docs/references/gitpod-yml +# https://www.gitpod.io/docs/configure +# https://www.gitpod.io/docs/configure/workspaces/ports + image: file: .gitpod.Dockerfile +# https://www.gitpod.io/docs/configure/workspaces/tasks#execution-order +# https://www.gitpod.io/docs/configure/projects/prebuilds tasks: - - name: Start containers + - name: Init Docker-Compose init: | docker-compose pull - - command: | - docker-compose -f ./deployments/docker-compose/infrastracture.yaml up -d + docker-compose -f ./deployments/docker-compose/docker-compose.infrastructure.yaml up -d - name: Restore & Build init: | - dotnet dev-certs https + dotnet dev-certs https dotnet restore dotnet build - - name: Run - command: dotnet run - + vscode: extensions: - - muhammad-sammy.csharp - ms-azuretools.vscode-docker + - muhammad-sammy.csharp From cac55551cd111b4fd419bef11b711970fc9b9637 Mon Sep 17 00:00:00 2001 From: Meysam Hadeli <35596795+meysamhadeli@users.noreply.github.com> Date: Thu, 5 Jan 2023 00:20:47 +0330 Subject: [PATCH 12/18] Update .gitpod.yml --- .gitpod.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitpod.yml b/.gitpod.yml index 53e3acf..3abed97 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -14,7 +14,7 @@ tasks: - name: Init Docker-Compose init: | docker-compose pull - docker-compose -f ./deployments/docker-compose/docker-compose.infrastructure.yaml up -d + docker-compose -f ./deployments/docker-compose/infrastracture.yaml up -d - name: Restore & Build init: | dotnet dev-certs https From cc0fc7ef64fbe94b94ec34a835d910100be943df Mon Sep 17 00:00:00 2001 From: Meysam Hadeli <35596795+meysamhadeli@users.noreply.github.com> Date: Thu, 5 Jan 2023 02:36:51 +0330 Subject: [PATCH 13/18] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b48eeb8..5479a9d 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,7 @@ Using the CQRS pattern, we cut each business functionality into vertical slices, Run the following commands for [Config SSL](https://docs.microsoft.com/en-us/aspnet/core/security/docker-compose-https?view=aspnetcore-6.0) in your system ```bash -dotnet dev-certs https -ep %USERPROFILE%\.aspnet\https\aspnetapp.pfx -p {password here} +dotnet dev-certs https -ep %USERPROFILE%\.aspnet\https\aspnetapp.pfx -p password dotnet dev-certs https --trust ``` From a6a147568377ab28f8fca695d89053cb8a408acc Mon Sep 17 00:00:00 2001 From: Meysam Hadeli <35596795+meysamhadeli@users.noreply.github.com> Date: Thu, 5 Jan 2023 02:54:30 +0330 Subject: [PATCH 14/18] Update README.md --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5479a9d..7e8ba7f 100644 --- a/README.md +++ b/README.md @@ -138,13 +138,18 @@ Using the CQRS pattern, we cut each business functionality into vertical slices, Run the following commands for [Config SSL](https://docs.microsoft.com/en-us/aspnet/core/security/docker-compose-https?view=aspnetcore-6.0) in your system +#### Windows using Linux containers ```bash dotnet dev-certs https -ep %USERPROFILE%\.aspnet\https\aspnetapp.pfx -p password dotnet dev-certs https --trust ``` - > Note: for running this command in `powershell` use `$env:USERPROFILE` instead of `%USERPROFILE%` +#### macOS or Linux +```bash +dotnet dev-certs https -ep ${HOME}/.aspnet/https/aspnetapp.pfx -p $CREDENTIAL_PLACEHOLDER$ +dotnet dev-certs https --trust +``` ### Docker Compose Run this app in docker using the [docker-compose.yaml](./deployments/docker-compose/docker-compose.yaml) file with the below command at the root of the application: From 36386e29bb4a32e592f0f2a0a7abc9176e626f02 Mon Sep 17 00:00:00 2001 From: Meysam Hadeli <35596795+meysamhadeli@users.noreply.github.com> Date: Mon, 9 Jan 2023 00:20:45 +0330 Subject: [PATCH 15/18] Update dotnet.yml --- .github/workflows/dotnet.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index d027baf..73a3d20 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -21,4 +21,7 @@ jobs: run: dotnet restore - name: Build run: dotnet build -c Release --no-restore + - name: Test + run: dotnet test -c Release --no-restore + From f94fbc200c2b16a1e03fde139c8c3c23a32c6278 Mon Sep 17 00:00:00 2001 From: Meysam Hadeli <35596795+meysamhadeli@users.noreply.github.com> Date: Thu, 12 Jan 2023 00:16:51 +0330 Subject: [PATCH 16/18] Add files via upload --- .github/dependabot.yml | 14 +++++ .github/pull_request_template.md | 39 +++++++++++++ .github/release-drafter.yml | 99 ++++++++++++++++++++++++++++++++ .github/release.yml | 47 +++++++++++++++ 4 files changed, 199 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/pull_request_template.md create mode 100644 .github/release-drafter.yml create mode 100644 .github/release.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..96fe9c3 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,14 @@ +version: 2 +updates: + - package-ecosystem: nuget + directory: '/' + schedule: + interval: monthly + reviewers: + - meysamhadeli + assignees: + - meysamhadeli + ignore: + - dependency-name: '*' + versions: + - '>= 0' \ No newline at end of file diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..0ff9814 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,39 @@ + + +## What does this PR do? + + + +## Why is it important? + + + +## Related issues + + +- + + + + \ No newline at end of file diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..4b935df --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,99 @@ +# https://johanneskonings.dev/github/2021/02/28/github_automatic_releases_and-changelog/ +# https://tiagomichaelsousa.dev/articles/stop-writing-your-changelogs-manually +# https://github.com/release-drafter/release-drafter/issues/551 +# https://github.com/release-drafter/release-drafter/pull/1013 +# https://github.com/release-drafter/release-drafter/issues/139 +# https://github.com/atk4/data/blob/develop/.github/release-drafter.yml + +# This release drafter follows the conventions from https://keepachangelog.com, https://common-changelog.org/ +# https://www.conventionalcommits.org + +name-template: 'v$RESOLVED_VERSION' +tag-template: 'v$RESOLVED_VERSION' +template: | + ## What Changed 👀 + + $CHANGES + **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION +categories: + - title: 🚀 Features + labels: + - feature + - title: 🐛 Bug Fixes + labels: + - fix + - bug + - title: ♻️ Changes + labels: + - changed + - enhancement + - refactor + - title: ⛔️ Deprecated + labels: + - deprecated + - title: 🗑 Removed + labels: + - removed + - title: 🔐 Security + labels: + - security + - title: 📄 Documentation + labels: + - docs + - documentation + - title: 🧩 Dependency Updates + labels: + - deps + - dependencies + - title: 🧰 Maintenance + label: 'chore' + - title: 🧺 Miscellaneous #Everything except ABAP + label: misc + - title: 📝 Other changes +## putting no labels pr to `Other Changes` category with no label - https://github.com/release-drafter/release-drafter/issues/139#issuecomment-480473934 + +# https://www.trywilco.com/post/wilco-ci-cd-github-heroku +# https://github.com/release-drafter/release-drafter#autolabeler +# https://github.com/fuxingloh/multi-labeler + +# Using regex for defining rules - https://regexr.com/ - https://regex101.com/ +autolabeler: + - label: 'chore' + branch: + - '/(chore)\/.*/' + title: + - '/^chore: .*/' + - label: 'docs' + branch: + - '/(docs)\/.*/' + title: + - '/^docs: .*/' + - label: 'bug' + branch: + - '/(fix)\/.*/' + title: + - '/^fix: .*/' + - label: 'feature' + branch: + - '/(feat)\/.*/' + title: + - '/^feat: .*/' + body: + - '/JIRA-[0-9]{1,4}/' + +change-template: '- $TITLE @$AUTHOR (#$NUMBER)' +change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. +version-resolver: + major: + labels: + - major + minor: + labels: + - minor + patch: + labels: + - patch + default: patch + +exclude-labels: + - skip-changelog diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..b209cf1 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,47 @@ +# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes +# https://github.com/bcoe/conventional-release-labels +# https://dev.to/github/how-to-automatically-generate-release-notes-for-your-project-2ng8 +# https://www.conventionalcommits.org/en/v1.0.0/ + +# github release pre-defined template +changelog: + exclude: + labels: + - ignore-for-release + categories: + - title: 🚀 Features + labels: + - feature + - title: 🐛 Bug Fixes + labels: + - fix + - bug + - title: ♻️ Changes + labels: + - changed + - enhancement + - refactor + - title: ⛔️ Deprecated + labels: + - deprecated + - title: 🗑 Removed + labels: + - removed + - title: 🔐 Security + labels: + - security + - title: 📄 Documentation + labels: + - docs + - documentation + - title: 🧩 Dependency Updates + labels: + - deps + - dependencies + - title: 🧰 Maintenance + label: 'chore' + - title: 🧺 Miscellaneous #Everything except ABAP + label: misc + - title: Other Changes + labels: + - "*" From b57fa6a28b62e152971e9af6743ba18409905d9b Mon Sep 17 00:00:00 2001 From: Meysam Hadeli <35596795+meysamhadeli@users.noreply.github.com> Date: Thu, 12 Jan 2023 00:17:06 +0330 Subject: [PATCH 17/18] Delete release-please.yml --- .github/workflows/release-please.yml | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 .github/workflows/release-please.yml diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml deleted file mode 100644 index bd31072..0000000 --- a/.github/workflows/release-please.yml +++ /dev/null @@ -1,15 +0,0 @@ -# https://github.com/google-github-actions/release-please-action#how-release-please-works -# https://www.conventionalcommits.org/en/v1.0.0/ -on: - push: - branches: - - main -name: release-please -jobs: - release-please: - runs-on: ubuntu-latest - steps: - - uses: google-github-actions/release-please-action@v3 - with: - release-type: go - package-name: release-please-action From 6dd043cf64aabc36e9a8c0414d5c64384f2b52d4 Mon Sep 17 00:00:00 2001 From: Meysam Hadeli <35596795+meysamhadeli@users.noreply.github.com> Date: Thu, 12 Jan 2023 00:17:34 +0330 Subject: [PATCH 18/18] Add files via upload --- .github/workflows/checker.yml | 33 ++++++++++++++++ .github/workflows/codeql-analysis.yml | 38 +++++++++++++++++++ .github/workflows/release-drafter-labeler.yml | 21 ++++++++++ .github/workflows/release-drafter.yml | 20 ++++++++++ .github/workflows/update-changelog.yml | 30 +++++++++++++++ 5 files changed, 142 insertions(+) create mode 100644 .github/workflows/checker.yml create mode 100644 .github/workflows/codeql-analysis.yml create mode 100644 .github/workflows/release-drafter-labeler.yml create mode 100644 .github/workflows/release-drafter.yml create mode 100644 .github/workflows/update-changelog.yml diff --git a/.github/workflows/checker.yml b/.github/workflows/checker.yml new file mode 100644 index 0000000..9c6ed5a --- /dev/null +++ b/.github/workflows/checker.yml @@ -0,0 +1,33 @@ +# https://github.com/amannn/action-semantic-pull-request +# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests + +name: Conventional Commits Checks + +on: + workflow_run: + workflows: ["Release Drafter Auto Labeler"] + types: + - completed + +#concurrency: +# group: ${{ github.workflow }}-${{ github.event.pull_request.number }} +# cancel-in-progress: true + +jobs: + + check-conventional-commits-labels: + name: Check conventional commits labels + runs-on: [ self-hosted ] + steps: + - uses: danielchabr/pr-labels-checker@v3.1 + with: + hasSome: feature,fix,changed,deprecated,removed,security,docs,dependencies + githubToken: ${{ secrets.GITHUB_TOKEN }} + + validate-pull-request-title: + name: Validate PR title + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..5cf6245 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,38 @@ +name: CodeQL + +on: + push: + branches: [ develop, main ] + pull_request: + branches: [ develop, main ] + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} + cancel-in-progress: true + +jobs: + analyze: + strategy: + fail-fast: false + matrix: + language: [ csharp ] + + permissions: + security-events: write + + runs-on: ubuntu-22.04 + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/release-drafter-labeler.yml b/.github/workflows/release-drafter-labeler.yml new file mode 100644 index 0000000..dfae2e3 --- /dev/null +++ b/.github/workflows/release-drafter-labeler.yml @@ -0,0 +1,21 @@ +name: Release Drafter Auto Labeler + +on: + pull_request: + types: + - opened + - synchronize + - reopened + - labeled + - unlabeled + +jobs: + auto-labeler: + runs-on: ubuntu-latest + steps: + - uses: release-drafter/release-drafter@v5 + with: + config-name: release-drafter.yml + disable-releaser: true # only run auto-labeler for PRs + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 0000000..5e1d3dd --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,20 @@ + # https://johanneskonings.dev/github/2021/02/28/github_automatic_releases_and-changelog/ + # https://tiagomichaelsousa.dev/articles/stop-writing-your-changelogs-manually + name: Release Drafter + + on: + push: + branches: + - develop + - main + + jobs: + update_release_draft: + name: Release drafter + runs-on: ubuntu-latest + + steps: + - name: Update Release Draft + uses: release-drafter/release-drafter@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml new file mode 100644 index 0000000..c82b5c8 --- /dev/null +++ b/.github/workflows/update-changelog.yml @@ -0,0 +1,30 @@ + on: + release: + types: + - released + push: + branches: + - main + +# Every push to main will create a new release and deploy to production. + jobs: + update: + name: Update Changelog + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Update Changelog + uses: stefanzweifel/changelog-updater-action@v1 + with: + latest-version: ${{ github.event.release.name }} + release-notes: ${{ github.event.release.body }} + + - name: Commit updated Changelog + uses: stefanzweifel/git-auto-commit-action@v4 + with: + branch: main + commit_message: 'docs(changelog): update changelog' + file_pattern: CHANGELOG.md