chore: include release in wf
This commit is contained in:
@@ -43,7 +43,7 @@ jobs:
|
|||||||
id: bump
|
id: bump
|
||||||
run: |
|
run: |
|
||||||
uv tool install bump-my-version
|
uv tool install bump-my-version
|
||||||
uv tool run bump-my-version bump ${{ github.event.inputs.bump }} --allow-dirty
|
uv tool run bump-my-version bump ${{ github.event.inputs.bump }}
|
||||||
# echo the version to github env, the version is shown by using uv tool run bump-my-version show current_version
|
# echo the version to github env, the version is shown by using uv tool run bump-my-version show current_version
|
||||||
echo "VERSION<<EOF" >> $GITHUB_ENV
|
echo "VERSION<<EOF" >> $GITHUB_ENV
|
||||||
echo "$(uv tool run bump-my-version show current_version)" >> $GITHUB_ENV
|
echo "$(uv tool run bump-my-version show current_version)" >> $GITHUB_ENV
|
||||||
@@ -55,6 +55,44 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
branch: ${{ github.ref }}
|
branch: ${{ github.ref }}
|
||||||
|
- name: Build Changelog
|
||||||
|
uses: https://github.com/mikepenz/release-changelog-builder-action@v5
|
||||||
|
with:
|
||||||
|
platform: "gitea" # gitea or GitHub, default is GitHub
|
||||||
|
mode: "COMMIT"
|
||||||
|
configurationJson: |
|
||||||
|
{
|
||||||
|
"template": "#{{CHANGELOG}}",
|
||||||
|
"categories": [
|
||||||
|
{
|
||||||
|
"title": "## Feature",
|
||||||
|
"labels": ["feat", "feature"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "## Fix",
|
||||||
|
"labels": ["fix", "bug"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "## Other",
|
||||||
|
"labels": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"label_extractor": [
|
||||||
|
{
|
||||||
|
"pattern": "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\\([\\w\\-\\.]+\\))?(!)?: ([\\w ])+([\\s\\S]*)",
|
||||||
|
"on_property": "title",
|
||||||
|
"target": "$1"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
token: ${{ secrets.TOKEN }}
|
||||||
|
- name: create Release
|
||||||
|
if: ${{ github.event.inputs.github_release == 'true' }}
|
||||||
|
uses: softprops/action-gh-release@master
|
||||||
|
with:
|
||||||
|
tag_name: ${{ env.VERSION }}
|
||||||
|
release_name: Release ${{ env.VERSION }}
|
||||||
|
body: ${{ steps.changelog.outputs.changelog }}
|
||||||
|
|
||||||
# - name: Add release notes to environment
|
# - name: Add release notes to environment
|
||||||
# id: add_release_notes
|
# id: add_release_notes
|
||||||
|
|||||||
Reference in New Issue
Block a user