workflows cleanup (#287)
* remove install from assets * Ignore debian/changelog in prepare pr * fix changes.md written to main --------- Co-authored-by: Meliox <na>
This commit is contained in:
parent
877e57d2c9
commit
6c82bcfe7d
22
.github/workflows/prepare-release-pr.yml
vendored
22
.github/workflows/prepare-release-pr.yml
vendored
@ -13,6 +13,7 @@ on:
|
||||
paths:
|
||||
- 'src/**'
|
||||
- 'debian/**'
|
||||
- '!debian/changelog'
|
||||
pull_request:
|
||||
types:
|
||||
- labeled
|
||||
@ -45,24 +46,21 @@ jobs:
|
||||
|
||||
git fetch origin main
|
||||
|
||||
if [[ "${{ github.event_name }}" == "push" ]]; then
|
||||
# Always recreate from main — avoids rebase conflicts after PR merge
|
||||
git checkout -b chore/version-bump origin/main
|
||||
|
||||
# Collect all commits touching src/ since the last release tag
|
||||
# Collect all commits touching src/ since the last release tag (both paths need this)
|
||||
LAST_TAG=$(git describe --tags --abbrev=0 origin/main 2>/dev/null || true)
|
||||
if [[ -n "$LAST_TAG" ]]; then
|
||||
LOG=$(git log "${LAST_TAG}..origin/main" --oneline -- src/ | head -50)
|
||||
else
|
||||
LOG=$(git log origin/main --oneline -- src/ | head -50)
|
||||
fi
|
||||
mkdir -p .github/version-bump
|
||||
echo "${LOG:-No src/ changes since last release.}" > .github/version-bump/CHANGES.md
|
||||
git add .github/version-bump/CHANGES.md
|
||||
git diff --cached --quiet || git commit -m "chore: collect changes since ${LAST_TAG:-initial}"
|
||||
echo "${LOG:-No src/ changes since last release.}" > /tmp/CHANGES.md
|
||||
|
||||
if [[ "${{ github.event_name }}" == "push" ]]; then
|
||||
# Always recreate from main — avoids rebase conflicts after PR merge
|
||||
git checkout -b chore/version-bump origin/main
|
||||
git push --force origin chore/version-bump
|
||||
else
|
||||
# Label change: check out the existing branch, no CHANGES.md update
|
||||
# Label change: check out the existing branch
|
||||
git fetch origin chore/version-bump
|
||||
git checkout chore/version-bump
|
||||
fi
|
||||
@ -118,7 +116,7 @@ jobs:
|
||||
env:
|
||||
NEW_VERSION: ${{ steps.version.outputs.new }}
|
||||
run: |
|
||||
LOG=$(cat .github/version-bump/CHANGES.md 2>/dev/null || true)
|
||||
LOG=$(cat /tmp/CHANGES.md 2>/dev/null || true)
|
||||
DATE=$(date -R)
|
||||
# Base on main's changelog so reruns always replace the previous bot entry cleanly
|
||||
MAIN_CHANGELOG=$(git show origin/main:debian/changelog)
|
||||
@ -145,7 +143,7 @@ jobs:
|
||||
{
|
||||
echo "## Release v${NEW_VERSION}"
|
||||
echo ""
|
||||
cat .github/version-bump/CHANGES.md 2>/dev/null || echo "No changes recorded."
|
||||
cat /tmp/CHANGES.md 2>/dev/null || echo "No changes recorded."
|
||||
echo ""
|
||||
echo "---"
|
||||
echo "*Change label to \`bump:minor\` or \`bump:major\` before merging if needed.*"
|
||||
|
||||
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@ -109,7 +109,6 @@ jobs:
|
||||
DEB_ASC: ${{ steps.assets.outputs.deb_asc }}
|
||||
run: |
|
||||
ASSETS="$DEB $DEB_ASC /tmp/SHA256SUMS /tmp/SHA256SUMS.asc"
|
||||
[[ -f install.sh ]] && ASSETS="$ASSETS install.sh"
|
||||
|
||||
gh release create "$TAG" \
|
||||
--title "pve-mod $TAG" \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user