Compare commits

...

2 Commits

Author SHA1 Message Date
7c46aa346a chore(deps): update actions/checkout action to v4.2.2
Some checks failed
CI / ci (pull_request) Has been cancelled
2025-01-01 02:34:54 +00:00
a5a687face
chore(ci): manually build changelog 2025-01-01 02:11:01 +00:00
2 changed files with 73 additions and 36 deletions

View File

@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out repository code - name: Check out repository code
uses: actions/checkout@v4.1.7 uses: actions/checkout@v4.2.2
with: with:
fetch-depth: 0 fetch-depth: 0

View File

@ -30,7 +30,7 @@ jobs:
outputs: outputs:
latesttag: ${{ steps.latesttag.outputs.latesttag }} latesttag: ${{ steps.latesttag.outputs.latesttag }}
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.2
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Get latest tag - name: Get latest tag
@ -52,9 +52,9 @@ jobs:
outputs: outputs:
release_name: ${{ steps.tag_version.outputs.new_tag }} release_name: ${{ steps.tag_version.outputs.new_tag }}
success: ${{ steps.set_flag.outputs.success }} success: ${{ steps.set_flag.outputs.success }}
srvurl: ${{ steps.set_srvurl.outputs.srvurl }} # srvurl: ${{ steps.set_srvurl.outputs.srvurl }}
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.2
with: with:
fetch-depth: 0 fetch-depth: 0
@ -63,7 +63,44 @@ jobs:
run: | run: |
CHANGES=$(git log $(git describe --tags --abbrev=0)..HEAD --no-merges --oneline) CHANGES=$(git log $(git describe --tags --abbrev=0)..HEAD --no-merges --oneline)
echo "$CHANGES" echo "$CHANGES"
if [ -z "$CHANGES" ]; then echo "changes=false" >> "$GITEA_OUTPUT"; else echo "changes=true" >> "$GITEA_OUTPUT"; fi $CHANGES_FEAT=$(echo "$CHANGES" | grep -i "feat")
$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_feat=false" >> "$GITEA_OUTPUT"
echo "changes_fix=false" >> "$GITEA_OUTPUT"
echo "changes_dep=false" >> "$GITEA_OUTPUT"
echo "changes_other=false" >> "$GITEA_OUTPUT"
else
echo "changes=true" >> "$GITEA_OUTPUT"
echo "changes_feat=CHANGES_FEAT" >> "$GITEA_OUTPUT"
echo "changes_fix=CHANGES_FIX" >> "$GITEA_OUTPUT"
echo "changes_dep=CHANGES_DEP" >> "$GITEA_OUTPUT"
echo "changes_other=CHANGES_OTHER" >> "$GITEA_OUTPUT"
fi
- name: Create changelog
id: create_changelog
run: |
if test "${{ steps.changes.outputs.changes }}" = "true"
then
cat <<EOF >> changelog.md
## 🚀 Features
$CHANGES_FEAT
## 🐛 Bug Fixes
$CHANGES_FIX
## 📦 Dependencies
$CHANGES_DEP
## 💬 Other
$CHANGES_OTHER
EOF
fi
- name: Set server URL - name: Set server URL
id: set_srvurl id: set_srvurl
@ -94,36 +131,36 @@ jobs:
# default_bump: minor # default_bump: minor
# # default_bump: false # # default_bump: false
- name: Build Changelog # - name: Build Changelog
uses: mikepenz/release-changelog-builder-action@v4 # uses: mikepenz/release-changelog-builder-action@v4
id: build_changelog # id: build_changelog
env: # env:
GITHUB_TOKEN: ${{ gitea.token }} # GITHUB_TOKEN: ${{ gitea.token }}
with: # with:
platform: "gitea" # platform: "gitea"
configurationJson: | # configurationJson: |
{ # {
"pr_template": "- #{{TITLE}} ([##{{NUMBER}}](#{{URL}}))", # "pr_template": "- #{{TITLE}} ([##{{NUMBER}}](#{{URL}}))",
"empty_template": "- no changes", # "empty_template": "- no changes",
"categories": [ # "categories": [
{ # {
"title": "## 💬 Other", # "title": "## 💬 Other",
"labels": ["type/other"] # "labels": ["type/other"]
}, # },
{ # {
"title": "## 📦 Dependencies", # "title": "## 📦 Dependencies",
"labels": ["type/dependencies"] # "labels": ["type/dependencies"]
}, # },
{ # {
"title": "## 🚀 Features", # "title": "## 🚀 Features",
"labels": ["type/feature"] # "labels": ["type/feature"]
}, # },
{ # {
"title": "## 🐛 Bug Fixes", # "title": "## 🐛 Bug Fixes",
"labels": ["type/bugfix"] # "labels": ["type/bugfix"]
}, # },
] # ]
} # }
- name: Create release - name: Create release
id: create_release id: create_release
@ -133,7 +170,7 @@ jobs:
with: with:
tag: ${{ steps.get_next_version.outputs.tag }} tag: ${{ steps.get_next_version.outputs.tag }}
name: ${{ steps.get_next_version.outputs.tag }} name: ${{ steps.get_next_version.outputs.tag }}
body: ${{ steps.build_changelog.outputs.changelog }} body_path: changelog.md
- name: Set success/fail flag - name: Set success/fail flag
id: set_flag id: set_flag