Skip to content

Commit

Permalink
feat: integrate automated release
Browse files Browse the repository at this point in the history
  • Loading branch information
tboerger committed Jun 5, 2023
1 parent 834c2b4 commit 7b1c858
Show file tree
Hide file tree
Showing 3 changed files with 174 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
commitsOnly: true
anyCommit: true
allowMergeCommits: true
allowRevertCommits: true

types:
- feat
- fix
- docs
- style
- refactor
- perf
- test
- build
- ci
- chore
- revert
- major
- minor
- patch

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

"on":
schedule:
- cron: "0 8 * * 1"
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout source
uses: actions/checkout@v3
with:
token: ${{ secrets.BOT_ACCESS_TOKEN }}

- name: Write buildtime
run: date >| .github/RELEASEDATE

- name: Semantic release
uses: cycjimmy/semantic-release-action@v3
env:
GITHUB_TOKEN: ${{ secrets.BOT_ACCESS_TOKEN }}
with:
extra_plugins: |
conventional-changelog-conventionalcommits
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
author_name: GitHub Actions
author_email: [email protected]
add: .github/RELEASEDATE
message: "docs: automated release update [skip ci]"
push: true
commit: --signoff

...
111 changes: 111 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
"branches": [
"master"
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits",
"releaseRules": [
{
"type": "major",
"release": "major"
},
{
"type": "deps",
"scope": "major",
"release": "major"
},
{
"type": "minor",
"release": "minor"
},
{
"type": "deps",
"scope": "minor",
"release": "minor"
},
{
"type": "patch",
"release": "patch"
},
{
"type": "deps",
"scope": "patch",
"release": "patch"
},
{
"type": "refactor",
"release": "minor"
},
{
"scope": "docs",
"release": false
}
]
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "major",
"section": "Features"
},
{
"type": "minor",
"section": "Features"
},
{
"type": "fix",
"section": "Bugfixes"
},
{
"type": "patch",
"section": "Bugfixes"
},
{
"type": "chore",
"hidden": true
},
{
"type": "docs",
"hidden": true
},
{
"type": "refactor",
"hidden": true
}
]
}
}
],
[
"@semantic-release/changelog",
{
"changelogTitle": "# Changelog"
}
],
[
"@semantic-release/git",
{
"message": "chore: release ${nextRelease.version} [skip ci]",
"assets": ["CHANGELOG.md"]
}
],
[
"@semantic-release/github",
{
"addReleases": true
}
]
]
}

0 comments on commit 7b1c858

Please sign in to comment.