fix(ci): address Greptile review findings

- Remove undefined should_bump_version input from release.yml
- Fix Discord action variable expansion (single to double quotes)
- Add has_changes gate to changelog and test jobs
- Use unique heredoc delimiter to prevent collision with commit messages
This commit is contained in:
quotentiroler
2026-02-06 15:37:01 -08:00
parent 45789653c0
commit 4f07791455
4 changed files with 8 additions and 7 deletions

View File

@@ -43,8 +43,8 @@ runs:
TIMESTAMP="\"timestamp\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\","
fi
# Escape description for JSON
DESCRIPTION=$(echo '${{ inputs.description }}' | jq -Rs .)
# Escape description for JSON (use double quotes for variable expansion)
DESCRIPTION=$(echo "${{ inputs.description }}" | jq -Rs .)
PAYLOAD=$(cat <<EOF
{

View File

@@ -121,10 +121,10 @@ jobs:
CHANGELOG="${CHANGELOG}**Release Type**: ${RELEASE_TYPE}\n"
CHANGELOG="${CHANGELOG}**Full Changelog**: https://github.com/${{ github.repository }}/compare/${LATEST_TAG:-initial}...v${VERSION}\n"
# Escape for multiline output
echo "changelog<<EOF" >> $GITHUB_OUTPUT
# Escape for multiline output (use unique delimiter to avoid collision with commit messages)
echo "changelog<<__CHANGELOG_HEREDOC_DELIMITER__" >> $GITHUB_OUTPUT
echo -e "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
echo "__CHANGELOG_HEREDOC_DELIMITER__" >> $GITHUB_OUTPUT
echo "changelog_file=CHANGELOG.md" >> $GITHUB_OUTPUT
# Also write to step summary

View File

@@ -108,6 +108,7 @@ jobs:
changelog:
name: Changelog
needs: [get-commits, version]
if: needs.get-commits.outputs.has_changes == 'true'
uses: ./.github/workflows/generate-changelog.yml
with:
version: ${{ needs.version.outputs.new_version }}
@@ -117,7 +118,8 @@ jobs:
# Run full test suite for the release type
test:
name: Test
needs: version
needs: [get-commits, version]
if: needs.get-commits.outputs.has_changes == 'true'
uses: ./.github/workflows/testing-strategy.yml
with:
test_stage: ${{ inputs.release_type == 'stable' && 'stable' || inputs.release_type }}

View File

@@ -47,6 +47,5 @@ jobs:
with:
release_type: ${{ inputs.release_type }}
source_branch: ${{ needs.determine-branch.outputs.branch }}
should_bump_version: true
dry_run: ${{ inputs.dry_run }}
secrets: inherit