Feature: Added possibility to create github releases with changelog
This commit is contained in:
parent
e961872f14
commit
77e593777d
36
.github/workflows/build.yml
vendored
36
.github/workflows/build.yml
vendored
@ -107,31 +107,43 @@ jobs:
|
||||
.pio/build/${{ matrix.environment }}/bootloader.bin
|
||||
.pio/build/${{ matrix.environment }}/boot_app0.bin
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
name: opendtu-release
|
||||
path: |
|
||||
.pio/build/${{ matrix.environment }}/opendtu-${{ matrix.environment }}.bin
|
||||
.pio/build/${{ matrix.environment }}/partitions.bin
|
||||
.pio/build/${{ matrix.environment }}/bootloader.bin
|
||||
.pio/build/${{ matrix.environment }}/boot_app0.bin
|
||||
|
||||
release:
|
||||
name: Create Release
|
||||
runs-on: ubuntu-latest
|
||||
needs: [get_default_envs, build]
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build Changelog
|
||||
id: github_release
|
||||
uses: mikepenz/release-changelog-builder-action@v3.7.0
|
||||
with:
|
||||
failOnError: true
|
||||
commitMode: true
|
||||
configuration: ".github/workflows/config/release-notes-config.json"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: opendtu-release
|
||||
path: artifacts/
|
||||
|
||||
- name: Create ZIPs
|
||||
run: |
|
||||
ls -R
|
||||
sudo apt install zip
|
||||
cd artifacts
|
||||
for i in */; do zip -r "${i%/}.zip" "$i"; done
|
||||
for i in */; do cp ${i}opendtu-*.bin ./; done
|
||||
|
||||
- name: Create release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
body: ${{steps.github_release.outputs.changelog}}
|
||||
draft: False
|
||||
files: |
|
||||
*.bin
|
||||
artifacts/*.zip, artifacts/*.bin
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
44
.github/workflows/config/release-notes-config.json
vendored
Normal file
44
.github/workflows/config/release-notes-config.json
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
{
|
||||
"categories": [
|
||||
{
|
||||
"title": "## ⚡ Breaking Changes",
|
||||
"labels": [
|
||||
"breaking change"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "## 🚀 Features",
|
||||
"labels": [
|
||||
"feature"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "## 🐛 Fixes",
|
||||
"labels": [
|
||||
"fix"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "## 📚 Documentation",
|
||||
"labels": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "## 🛠 Under the hood",
|
||||
"labels": []
|
||||
}
|
||||
],
|
||||
"template": "${{CHANGELOG}}",
|
||||
"pr_template": "- [${{TITLE}}](https://github.com/tbnobody/OpenDTU/commit/${{MERGE_SHA}})",
|
||||
"empty_template": "- no changes",
|
||||
"label_extractor": [
|
||||
{
|
||||
"pattern": "(.): (.+)",
|
||||
"target": "$1"
|
||||
}
|
||||
],
|
||||
"tag_resolver": {
|
||||
"method": "sort"
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user