Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stage #26

Merged
merged 17 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
#8 Added changelog manager
  • Loading branch information
Dubravko Rittuper committed Jan 25, 2024
commit e0be5073747a83dd24dcdd81853350b55ca105c3
1 change: 1 addition & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
push:
branches:
- main
- stage

jobs:
test-starter:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/codeql-anaysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
push:
branches:
- main
- stage
schedule:
- cron: '00 0 * * 1'

Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Release

# Triggering the workflow on pushes to main
on:
push:
branches:
- main

jobs:
# Release job
release:
name: Release
runs-on: ubuntu-latest

steps:
# Checkout
- name: Checkout
uses: actions/checkout@v3

# Bump version and update changelog
- name: Bump version and update changelog
id: version-bump
uses: Enterwell/ChangelogManager-GitHub-Action@v3
with:
should-bump-version: true
path-to-project-file: ./Acme.Interface.WebAPI/Acme.Interface.WebAPI.csproj

# Committing new changes
- name: Commit changes
uses: EndBug/[email protected]
with:
message: "[skip ci] [version-bump] Automated commit for version ${{ steps.version-bump.outputs.bumped-semantic-version }}"

# # Update Git tags - uncomment once you add your secrets and configs
# - name: Git tags update
# run: |
# git config user.name github-actions
# git config user.email [email protected]

# git tag "v${{ steps.version-bump.outputs.bumped-semantic-version }}"
# git tag -f "v${{ steps.version-bump.outputs.bumped-major-part }}" "v${{ steps.version-bump.outputs.bumped-semantic-version }}"
# git tag -f "v${{ steps.version-bump.outputs.bumped-major-part }}.${{ steps.version-bump.outputs.bumped-minor-part }}" "v${{ steps.version-bump.outputs.bumped-semantic-version }}"

# git push -f --tags

# # Creating latest release
# - name: Create GitHub release
# run: gh release create "v${{ steps.version-bump.outputs.bumped-semantic-version }}" -n "${{ steps.version-bump.outputs.new-changes }}"
# env:
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions Acme.Interface.WebAPI/Acme.Interface.WebAPI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<UserSecretsId>680006c1-a722-4bf8-8116-b8c2fba51400</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
<Version>1.0</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
_NOTE: This is an automatically generated file. Do not modify contents of this file manually._

## [Unreleased]
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
+ 🛠️ [Prerequisites](#-prerequisites)
+ 🔰 [Getting started](#-getting-started)
+ 🏛️ [Project structure](#-project-structure)
+ 🔄 [Continous integration](#-continous-integration)
+ 📄 [Changelog manager](#-changelog-manager)
+ ☎️ [Support](#-support)
+ 🪪 [License](#-license)

Expand Down Expand Up @@ -146,6 +148,25 @@ Layer that acts as a set of adapters that convert data from the format most conv

So, to be frank, only *Program.cs* is referencing Infrastructure and for that reason, we previously had a separate layer called `Interface.WebAPI.Starter` that would be bootstrapping the application and its' DI container. But, to reduce the number of layers, we stopped with that practice.

### 🔄 Continous integration

We've set up a couple of basic CI pipelines for GitHub Actions. You should review them and correct your branch names, if needed.

There are actions for:

+ Continous integration (CI) - checkouts, restores packages, builds, runs unit tests and adds code coverage
+ Code quality analysis - runs code quality analysis using CodeQL
+ Release - bumps the release version and merges _changelog entries_ into `CHANGELOG.MD` and optionally adds the git tag (if configured)

## 📄 Changelog manager

We like to see a nice and up-to-date changelog between releases, but sometimes that's just too much work. To simplify this process, we've developed our own [Changelog Manager](https://github.com/Enterwell/ChangelogManager) which adheres to the [Keep a changelog](https://keepachangelog.com/en/1.0.0/#how) principles, along with a couple of integrations to help you create _changelog entries_:

+ [Visual Studio extension](https://marketplace.visualstudio.com/items?itemName=Enterwell.EnterwellChangelogVsix)
+ [CLI tool](https://github.com/Enterwell/ChangelogManager/blob/main/Enterwell.CI.Changelog.CLI/README.md#changelog-create-cli-tool)

In short, you create _changelog entries_ either by manually adding entries (files) into the `./changes` folder (if you _really_ want to do it that way...) or by using one of the above mentioned tools. As your PR's are merged into the `stage` branch (or your equivalent development branch) this folder will accumulate entries which will be bundled up into your `CHANGELOG.MD` when you create a release (ie. when you merge `stage` into `main`), and the folder will be purged. Rinse and repeat for your next release!

## ☎ Support
If you are having problems, please let us know by [raising a new issue](https://github.com/Enterwell/dotnet-starter/issues/new).

Expand Down
Empty file.
Empty file added changes/Added GitHub actions
Empty file.
Empty file added changes/Added Initial release
Empty file.