Skip to content

Commit 0b1c553

Browse files
author
Kostas Demiris
committed
test: silly network naming
1 parent 88c3f62 commit 0b1c553

File tree

1 file changed

+54
-54
lines changed

1 file changed

+54
-54
lines changed

.github/workflows/create-release.yml

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -507,64 +507,64 @@ jobs:
507507
echo "DEBUG: Environment variables in script:"
508508
echo " NETWORK_NAME from env: '${{ env.NETWORK_NAME }}'"
509509
echo " MINTSCAN_CHAIN_ID from env: '${{ env.MINTSCAN_CHAIN_ID }}'"
510-
510+
511511
# Generate comprehensive PR body using external script
512512
./scripts/generate-pr-body.sh "${{ env.VERSION }}" "${{ env.CALCULATED_HEIGHT }}" "${{ env.DEPOSIT }}" "${{ env.EXPEDITED }}" "${{ env.PROPOSAL_FILE }}" "${{ env.RELEASE_FILE }}" "${{ env.RELEASE_NOTES_FILE }}" "${{ env.RELEASE_TAG }}" "${{ env.COMMIT_COUNT }}" "${{ env.FILES_CHANGED }}" "${{ env.PREVIOUS_VERSION }}" "${{ env.DARWIN_AMD64_CHECKSUM }}" "${{ env.DARWIN_ARM64_CHECKSUM }}" "${{ env.LINUX_AMD64_CHECKSUM }}" "${{ env.LINUX_ARM64_CHECKSUM }}" "${{ github.run_number }}" "${{ github.sha }}"
513513
514514
echo "PR_BODY_FILE=pr_body.md" >> $GITHUB_ENV
515515
cat pr_body.md
516516
517-
# - name: Create or Update Pull Request
518-
# env:
519-
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
520-
# run: |
521-
# # Check if we have any staged files or changes to commit
522-
# if git diff --cached --quiet && git diff --quiet; then
523-
# echo "No changes detected, but creating empty commit to update PR parameters"
524-
# # Read the commit message from file
525-
# COMMIT_MSG=$(cat pr_commit_message.txt)
526-
# git commit --allow-empty -m "$COMMIT_MSG"
527-
# else
528-
# echo "Changes detected, committing staged files"
529-
# # Read the commit message from file
530-
# COMMIT_MSG=$(cat pr_commit_message.txt)
531-
# git commit -m "$COMMIT_MSG"
532-
# fi
533-
534-
# # Push the changes
535-
# git push origin "${{ env.BRANCH_NAME }}"
536-
537-
# # Check if PR already exists
538-
# EXISTING_PR=$(gh pr list --head "${{ env.BRANCH_NAME }}" --base "${{ env.TARGET_BRANCH }}" --json number --jq '.[0].number' 2>/dev/null || echo "")
539-
540-
# if [ -n "$EXISTING_PR" ] && [ "$EXISTING_PR" != "null" ]; then
541-
# echo "Updating existing PR #$EXISTING_PR"
542-
# # Update existing PR body
543-
# gh pr edit "$EXISTING_PR" --body-file pr_body.md
544-
# echo "✅ Updated existing PR #$EXISTING_PR"
545-
# else
546-
# echo "Creating new PR"
547-
# gh pr create \
548-
# --base "${{ env.TARGET_BRANCH }}" \
549-
# --head "${{ env.BRANCH_NAME }}" \
550-
# --title "🚀 Upgrade to Xion ${{ env.RELEASE_TAG }}" \
551-
# --body-file pr_body.md
552-
# echo "✅ PR created successfully"
553-
# fi
554-
555-
# - name: Workflow Summary
556-
# run: |
557-
# echo "## 📋 Workflow Summary"
558-
# echo ""
559-
# echo "✅ PR has been created/updated for release ${{ env.RELEASE_TAG }}"
560-
# echo " - Proposal: ${{ env.PROPOSAL_FILE }}"
561-
# echo " - Release config: ${{ env.RELEASE_FILE }}"
562-
# echo " - Release notes: ${{ env.RELEASE_NOTES_FILE }}"
563-
# echo ""
564-
# echo "🔄 Configuration for this run:"
565-
# echo " - Release Tag: ${{ env.RELEASE_TAG }}"
566-
# echo " - Upgrade Height: ${{ env.CALCULATED_HEIGHT }}"
567-
# echo " - Deposit: ${{ env.DEPOSIT }}"
568-
# echo " - Expedited: ${{ env.EXPEDITED }}"
569-
# echo " - Run Number: ${{ github.run_number }}"
517+
- name: Create or Update Pull Request
518+
env:
519+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
520+
run: |
521+
# Check if we have any staged files or changes to commit
522+
if git diff --cached --quiet && git diff --quiet; then
523+
echo "No changes detected, but creating empty commit to update PR parameters"
524+
# Read the commit message from file
525+
COMMIT_MSG=$(cat pr_commit_message.txt)
526+
git commit --allow-empty -m "$COMMIT_MSG"
527+
else
528+
echo "Changes detected, committing staged files"
529+
# Read the commit message from file
530+
COMMIT_MSG=$(cat pr_commit_message.txt)
531+
git commit -m "$COMMIT_MSG"
532+
fi
533+
534+
# Push the changes
535+
git push origin "${{ env.BRANCH_NAME }}"
536+
537+
# Check if PR already exists
538+
EXISTING_PR=$(gh pr list --head "${{ env.BRANCH_NAME }}" --base "${{ env.TARGET_BRANCH }}" --json number --jq '.[0].number' 2>/dev/null || echo "")
539+
540+
if [ -n "$EXISTING_PR" ] && [ "$EXISTING_PR" != "null" ]; then
541+
echo "Updating existing PR #$EXISTING_PR"
542+
# Update existing PR body
543+
gh pr edit "$EXISTING_PR" --body-file pr_body.md
544+
echo "✅ Updated existing PR #$EXISTING_PR"
545+
else
546+
echo "Creating new PR"
547+
gh pr create \
548+
--base "${{ env.TARGET_BRANCH }}" \
549+
--head "${{ env.BRANCH_NAME }}" \
550+
--title "🚀 Upgrade to Xion ${{ env.RELEASE_TAG }}" \
551+
--body-file pr_body.md
552+
echo "✅ PR created successfully"
553+
fi
554+
555+
- name: Workflow Summary
556+
run: |
557+
echo "## 📋 Workflow Summary"
558+
echo ""
559+
echo "✅ PR has been created/updated for release ${{ env.RELEASE_TAG }}"
560+
echo " - Proposal: ${{ env.PROPOSAL_FILE }}"
561+
echo " - Release config: ${{ env.RELEASE_FILE }}"
562+
echo " - Release notes: ${{ env.RELEASE_NOTES_FILE }}"
563+
echo ""
564+
echo "🔄 Configuration for this run:"
565+
echo " - Release Tag: ${{ env.RELEASE_TAG }}"
566+
echo " - Upgrade Height: ${{ env.CALCULATED_HEIGHT }}"
567+
echo " - Deposit: ${{ env.DEPOSIT }}"
568+
echo " - Expedited: ${{ env.EXPEDITED }}"
569+
echo " - Run Number: ${{ github.run_number }}"
570570

0 commit comments

Comments
 (0)