Skip to content

Commit

Permalink
Automate release process
Browse files Browse the repository at this point in the history
  • Loading branch information
Forestsoft-de committed Oct 2, 2022
1 parent 02513b1 commit b6d9c28
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- '[0-9]+.[0-9]+.[0-9]+*' # Push events to any matching semantic tag. For example, 1.10.1 or 2.0.0 or 3.0.0-alpha.
# For more details, see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
# and https://docs.npmjs.com/about-semantic-versioning

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@main
with:
configuration: 'release-changelog-builder-config.json'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: ${{steps.build_changelog.outputs.changelog}}
draft: false
prerelease: false
33 changes: 33 additions & 0 deletions release-changelog-builder-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"categories": [
{
"title": "## 🐛 Bug Fixes",
"labels": ["bug"]
},
{
"title": "## 📃 Documentation Updates",
"labels": ["documentation"]
},
{
"title": "## ✨ Enhancements",
"labels": ["enhancement"]
}
],
"ignore_labels": ["ignore", "invalid", "wontfix"],
"sort": "ASC",
"template": "${{CATEGORIZED_COUNT}} changes since ${{FROM_TAG}}\n\n${{CHANGELOG}}\n\n## Other Updates\n\n${{UNCATEGORIZED}}\n",
"pr_template": "- ${{TITLE}} (#${{NUMBER}})",
"empty_template": "No Changes",
"label_extractor": [
{
"pattern": "(.) (.+)",
"target": "$1"
}
],
"max_tags_to_fetch": 200,
"max_pull_requests": 250,
"max_back_track_time_days": 90,
"tag_resolver": {
"method": "semver"
}
}

0 comments on commit b6d9c28

Please sign in to comment.