Skip to content

Commit

Permalink
ci: setup and automate semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
Azaferany committed Dec 28, 2022
1 parent 20341c6 commit 0a24bc3
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release

on: [workflow_dispatch]

jobs:
build-test-prep-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
env:
DOTNET_INSTALL_DIR: /usr/share/dotnet
- name: build and test
run: |
dotnet restore ./src/CSharp/EasyMicroservices.Serialization.sln
dotnet build ./src/CSharp/EasyMicroservices.Serialization.sln --no-restore
dotnet test ./src/CSharp/EasyMicroservices.Serialization.sln --no-build
- name: setup semantic-release
run: |
npm install -D semantic-release
npm install -D @semantic-release/git
npm install -D @semantic-release/changelog
npm install -D @semantic-release/exec
npm install -D semantic-release-dotnet
npm install -D conventional-changelog-conventionalcommits
- name: run semantic-release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
40 changes: 40 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"branches": [
"develop"
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits"
}
],
"@semantic-release/github",
"@semantic-release/changelog",
[
"semantic-release-dotnet",
{
"paths": [
"Directory.Build.props"
],
}
],
[
"@semantic-release/git",
{
"assets": [
"Directory.Build.props",
"*.md",
"docs"
],
"message": "chore: ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}

0 comments on commit 0a24bc3

Please sign in to comment.