Skip to content

chore(deps): bump next from 14.0.0 to 16.1.5 in /examples/nextjs-lefthook-example #6

chore(deps): bump next from 14.0.0 to 16.1.5 in /examples/nextjs-lefthook-example

chore(deps): bump next from 14.0.0 to 16.1.5 in /examples/nextjs-lefthook-example #6

Workflow file for this run

name: Release PR Validation
# Special workflow for release PRs created by release-please
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
pull-requests: write
issues: write
jobs:
check-if-release-pr:
name: Check if Release PR
runs-on: ubuntu-latest
outputs:
is-release-pr: ${{ steps.check.outputs.is-release-pr }}
steps:
- name: Check if this is a release PR
id: check
run: |
if [[ "${{ github.event.pull_request.user.login }}" == "github-actions[bot]" ]] && \
[[ "${{ github.event.pull_request.title }}" == *"chore: release"* ]]; then
echo "is-release-pr=true" >> $GITHUB_OUTPUT
echo "✅ This is a release PR created by release-please"
else
echo "is-release-pr=false" >> $GITHUB_OUTPUT
echo "ℹ️ This is a regular PR"
fi
validate-release-pr:
name: Validate Release PR
runs-on: ubuntu-latest
needs: check-if-release-pr
if: needs.check-if-release-pr.outputs.is-release-pr == 'true'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
install-dependencies: 'true'
- name: Validate release readiness
run: |
echo "🔍 Validating release readiness..."
# Run comprehensive tests
echo "Running comprehensive tests..."
npm test
# Test ESLint plugin
echo "Testing ESLint plugin..."
node test-validation/test-eslint-plugin.js
# Verify lib/validators sync
echo "Verifying validator synchronization..."
sync_issues=0
for validator in lib/validators/*.js; do
basename=$(basename "$validator")
eslint_validator="eslint-plugin-codekeeper/lib/validators/$basename"
if [ ! -f "$eslint_validator" ]; then
echo "❌ Missing: $eslint_validator"
sync_issues=$((sync_issues + 1))
continue
fi
if ! diff -q "$validator" "$eslint_validator" >/dev/null; then
echo "❌ Difference detected: $validator vs $eslint_validator"
sync_issues=$((sync_issues + 1))
fi
done
if [ $sync_issues -gt 0 ]; then
echo "❌ Found $sync_issues synchronization issues"
echo "Please run: cp -r lib/ eslint-plugin-codekeeper/"
exit 1
fi
echo "✅ Release validation completed successfully"
- name: Comment on release PR
uses: actions/github-script@v7
with:
script: |
const comment = `## 🚀 Release Validation Results
✅ **All validation tests passed**
✅ **ESLint plugin tests passed**
✅ **Validator synchronization verified**
This release is ready to be merged!
### What happens when you merge:
1. **Automated Release Creation**: GitHub releases will be created automatically
2. **ESLint Plugin Publishing**: Plugin will be published to GitHub Packages
3. **Release Assets**: Downloadable archives will be generated
4. **Changelog Update**: Changelog will be updated with conventional commit messages
### Release Contents:
- 🛡️ **Main Project**: Validation scripts, examples, documentation
- 🔌 **ESLint Plugin**: Latest validation rules for ESLint integration
Ready to ship! 🚢`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
});
auto-approve-release-pr:
name: Auto-approve Release PR
runs-on: ubuntu-latest
needs: [check-if-release-pr, validate-release-pr]
if: needs.check-if-release-pr.outputs.is-release-pr == 'true'
steps:
- name: Auto-approve release PR
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
// Auto-approve the release PR since it's generated by automation
// and has passed all validation tests
try {
await github.rest.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
event: 'APPROVE',
body: '🤖 Auto-approving release PR after successful validation'
});
console.log('✅ Release PR auto-approved');
} catch (error) {
console.log('ℹ️ Could not auto-approve (may already be approved):', error.message);
}