fix(ci): fix changelog layout
This commit is contained in:
parent
1ee8896ee4
commit
9f5f573270
@ -39,11 +39,11 @@ jobs:
|
|||||||
LATESTTAG=$(git describe --tags --abbrev=0)
|
LATESTTAG=$(git describe --tags --abbrev=0)
|
||||||
echo "latesttag=$LATESTTAG" >> "$GITEA_OUTPUT"
|
echo "latesttag=$LATESTTAG" >> "$GITEA_OUTPUT"
|
||||||
|
|
||||||
test:
|
# test:
|
||||||
name: Unit Test
|
# name: Unit Test
|
||||||
needs: get_latest_tag
|
# needs: get_latest_tag
|
||||||
uses: https://git.tainton.uk/public/webexmemebot/.gitea/workflows/ci.yml@${{ needs.get_latest_tag.outputs.latesttag }}
|
# uses: https://git.tainton.uk/public/webexmemebot/.gitea/workflows/ci.yml@${{ needs.get_latest_tag.outputs.latesttag }}
|
||||||
continue-on-error: true
|
# continue-on-error: true
|
||||||
|
|
||||||
create_release:
|
create_release:
|
||||||
name: Create Release
|
name: Create Release
|
||||||
@ -61,35 +61,40 @@ jobs:
|
|||||||
- name: Changes since last tag
|
- name: Changes since last tag
|
||||||
id: changes
|
id: changes
|
||||||
run: |
|
run: |
|
||||||
CHANGES=$(git log $(git describe --tags --abbrev=0)..HEAD --no-merges --oneline)
|
git log $(git describe --tags --abbrev=0)..HEAD --no-merges --oneline >> .changes
|
||||||
echo "$CHANGES"
|
cat ".changes"
|
||||||
$CHANGES_FEAT=$(echo "$CHANGES" | grep -i "feat")
|
if [[ -z $(grep '[^[:space:]]' .changes) ]] ; then
|
||||||
$CHANGES_FIX=$(echo "$CHANGES" | grep -i "fix")
|
|
||||||
$CHANGES_DEP=$(echo "$CHANGES" | grep -i "dependencies")
|
|
||||||
$CHANGES_OTHER=$(echo "$CHANGES" | grep -i "other")
|
|
||||||
if [ -z "$CHANGES" ]
|
|
||||||
then
|
|
||||||
echo "changes=false" >> "$GITEA_OUTPUT"
|
echo "changes=false" >> "$GITEA_OUTPUT"
|
||||||
else
|
else
|
||||||
echo "changes=true" >> "$GITEA_OUTPUT"
|
echo "changes=true" >> "$GITEA_OUTPUT"
|
||||||
echo $CHANGES_FEAT" >> .changes_feat
|
grep -n "feat" .changes > .changes_feat
|
||||||
echo $CHANGES_FIX" >> .changes_fix
|
grep -n "fix" .changes > .changes_fix
|
||||||
echo $CHANGES_DEP" >> .changes_dep
|
grep -n "dependencies" .changes > .changes_dep
|
||||||
echo $CHANGES_OTHER" >> .changes_other
|
grep -n "other" .changes > .changes_other
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Cancel if no changes
|
||||||
|
if: steps.changes.outputs.changes == 'false'
|
||||||
|
run: exit 1
|
||||||
|
|
||||||
- name: Create changelog
|
- name: Create changelog
|
||||||
id: create_changelog
|
id: create_changelog
|
||||||
|
if: steps.changes.outputs.changes == 'true'
|
||||||
run: |
|
run: |
|
||||||
if test "${{ steps.changes.outputs.changes }}" = "true"
|
if [[ -z $(grep '[^[:space:]]' .changes_feat) ]] ; then
|
||||||
then
|
|
||||||
printf "## 🚀 Features" > .changelog
|
printf "## 🚀 Features" > .changelog
|
||||||
cat .changes_feat >> .changelog
|
cat .changes_feat >> .changelog
|
||||||
printf "\n\n## 🐛 Bug Fixes" >> .changelog
|
fi
|
||||||
|
if [[ -z $(grep '[^[:space:]]' .changes_fix) ]] ; then
|
||||||
|
printf "## 🐛 Bug Fixes" >> .changelog
|
||||||
cat .changes_fix >> .changelog
|
cat .changes_fix >> .changelog
|
||||||
printf "\n\n## 📦 Dependencies" >> .changelog
|
fi
|
||||||
|
if [[ -z $(grep '[^[:space:]]' .changes_dep) ]] ; then
|
||||||
|
printf "## 📦 Dependencies" >> .changelog
|
||||||
cat .changes_dep >> .changelog
|
cat .changes_dep >> .changelog
|
||||||
printf "\n\n## 💬 Other" >> .changelog
|
fi
|
||||||
|
if [[ -z $(grep '[^[:space:]]' .changes_other) ]] ; then
|
||||||
|
printf "## 💬 Other" >> .changelog
|
||||||
cat .changes_other >> .changelog
|
cat .changes_other >> .changelog
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -113,46 +118,6 @@ jobs:
|
|||||||
skip-version-file: true
|
skip-version-file: true
|
||||||
skip-tag: true
|
skip-tag: true
|
||||||
|
|
||||||
# - name: Bump version and push tag
|
|
||||||
# id: tag_version
|
|
||||||
# if: steps.changes.outputs.changes == 'true'
|
|
||||||
# uses: mathieudutour/github-tag-action@v6.2
|
|
||||||
# with:
|
|
||||||
# github_token: ${{ gitea.token }}
|
|
||||||
# default_bump: minor
|
|
||||||
# # default_bump: false
|
|
||||||
|
|
||||||
# - name: Build Changelog
|
|
||||||
# uses: mikepenz/release-changelog-builder-action@v4
|
|
||||||
# id: build_changelog
|
|
||||||
# env:
|
|
||||||
# GITHUB_TOKEN: ${{ gitea.token }}
|
|
||||||
# with:
|
|
||||||
# platform: "gitea"
|
|
||||||
# configurationJson: |
|
|
||||||
# {
|
|
||||||
# "pr_template": "- #{{TITLE}} ([##{{NUMBER}}](#{{URL}}))",
|
|
||||||
# "empty_template": "- no changes",
|
|
||||||
# "categories": [
|
|
||||||
# {
|
|
||||||
# "title": "## 💬 Other",
|
|
||||||
# "labels": ["type/other"]
|
|
||||||
# },
|
|
||||||
# {
|
|
||||||
# "title": "## 📦 Dependencies",
|
|
||||||
# "labels": ["type/dependencies"]
|
|
||||||
# },
|
|
||||||
# {
|
|
||||||
# "title": "## 🚀 Features",
|
|
||||||
# "labels": ["type/feature"]
|
|
||||||
# },
|
|
||||||
# {
|
|
||||||
# "title": "## 🐛 Bug Fixes",
|
|
||||||
# "labels": ["type/bugfix"]
|
|
||||||
# },
|
|
||||||
# ]
|
|
||||||
# }
|
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
id: create_release
|
id: create_release
|
||||||
uses: akkuman/gitea-release-action@v1
|
uses: akkuman/gitea-release-action@v1
|
||||||
|
Loading…
Reference in New Issue
Block a user