Skip to content

Commit ae57a3b

Browse files
author
Kostas Demiris
committed
test: silly network naming
1 parent 05bf704 commit ae57a3b

File tree

2 files changed

+58
-63
lines changed

2 files changed

+58
-63
lines changed

.github/workflows/create-release.yml

Lines changed: 54 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,7 @@ jobs:
5252
runs-on: ubuntu-latest
5353

5454
steps:
55-
- name: Clear potential caches
56-
run: |
57-
# Clear any local caches that might interfere
58-
rm -rf ~/.cache/* || true
59-
rm -rf /tmp/* || true
60-
61-
# Force environment refresh
62-
echo "CACHE_BUST=$(date +%s)" >> $GITHUB_ENV
63-
55+
6456
- name: Checkout repository
6557
uses: actions/checkout@v4
6658

@@ -518,57 +510,57 @@ jobs:
518510
echo "PR_BODY_FILE=pr_body.md" >> $GITHUB_ENV
519511
cat pr_body.md
520512
521-
- name: Create or Update Pull Request
522-
env:
523-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
524-
run: |
525-
# Check if we have any staged files or changes to commit
526-
if git diff --cached --quiet && git diff --quiet; then
527-
echo "No changes detected, but creating empty commit to update PR parameters"
528-
# Read the commit message from file
529-
COMMIT_MSG=$(cat pr_commit_message.txt)
530-
git commit --allow-empty -m "$COMMIT_MSG"
531-
else
532-
echo "Changes detected, committing staged files"
533-
# Read the commit message from file
534-
COMMIT_MSG=$(cat pr_commit_message.txt)
535-
git commit -m "$COMMIT_MSG"
536-
fi
537-
538-
# Push the changes
539-
git push origin "${{ env.BRANCH_NAME }}"
540-
541-
# Check if PR already exists
542-
EXISTING_PR=$(gh pr list --head "${{ env.BRANCH_NAME }}" --base "${{ env.TARGET_BRANCH }}" --json number --jq '.[0].number' 2>/dev/null || echo "")
543-
544-
if [ -n "$EXISTING_PR" ] && [ "$EXISTING_PR" != "null" ]; then
545-
echo "Updating existing PR #$EXISTING_PR"
546-
# Update existing PR body
547-
gh pr edit "$EXISTING_PR" --body-file pr_body.md
548-
echo "✅ Updated existing PR #$EXISTING_PR"
549-
else
550-
echo "Creating new PR"
551-
gh pr create \
552-
--base "${{ env.TARGET_BRANCH }}" \
553-
--head "${{ env.BRANCH_NAME }}" \
554-
--title "🚀 Upgrade to Xion ${{ env.RELEASE_TAG }}" \
555-
--body-file pr_body.md
556-
echo "✅ PR created successfully"
557-
fi
558-
559-
- name: Workflow Summary
560-
run: |
561-
echo "## 📋 Workflow Summary"
562-
echo ""
563-
echo "✅ PR has been created/updated for release ${{ env.RELEASE_TAG }}"
564-
echo " - Proposal: ${{ env.PROPOSAL_FILE }}"
565-
echo " - Release config: ${{ env.RELEASE_FILE }}"
566-
echo " - Release notes: ${{ env.RELEASE_NOTES_FILE }}"
567-
echo ""
568-
echo "🔄 Configuration for this run:"
569-
echo " - Release Tag: ${{ env.RELEASE_TAG }}"
570-
echo " - Upgrade Height: ${{ env.CALCULATED_HEIGHT }}"
571-
echo " - Deposit: ${{ env.DEPOSIT }}"
572-
echo " - Expedited: ${{ env.EXPEDITED }}"
573-
echo " - Run Number: ${{ github.run_number }}"
513+
# - name: Create or Update Pull Request
514+
# env:
515+
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
516+
# run: |
517+
# # Check if we have any staged files or changes to commit
518+
# if git diff --cached --quiet && git diff --quiet; then
519+
# echo "No changes detected, but creating empty commit to update PR parameters"
520+
# # Read the commit message from file
521+
# COMMIT_MSG=$(cat pr_commit_message.txt)
522+
# git commit --allow-empty -m "$COMMIT_MSG"
523+
# else
524+
# echo "Changes detected, committing staged files"
525+
# # Read the commit message from file
526+
# COMMIT_MSG=$(cat pr_commit_message.txt)
527+
# git commit -m "$COMMIT_MSG"
528+
# fi
529+
530+
# # Push the changes
531+
# git push origin "${{ env.BRANCH_NAME }}"
532+
533+
# # Check if PR already exists
534+
# EXISTING_PR=$(gh pr list --head "${{ env.BRANCH_NAME }}" --base "${{ env.TARGET_BRANCH }}" --json number --jq '.[0].number' 2>/dev/null || echo "")
535+
536+
# if [ -n "$EXISTING_PR" ] && [ "$EXISTING_PR" != "null" ]; then
537+
# echo "Updating existing PR #$EXISTING_PR"
538+
# # Update existing PR body
539+
# gh pr edit "$EXISTING_PR" --body-file pr_body.md
540+
# echo "✅ Updated existing PR #$EXISTING_PR"
541+
# else
542+
# echo "Creating new PR"
543+
# gh pr create \
544+
# --base "${{ env.TARGET_BRANCH }}" \
545+
# --head "${{ env.BRANCH_NAME }}" \
546+
# --title "🚀 Upgrade to Xion ${{ env.RELEASE_TAG }}" \
547+
# --body-file pr_body.md
548+
# echo "✅ PR created successfully"
549+
# fi
550+
551+
# - name: Workflow Summary
552+
# run: |
553+
# echo "## 📋 Workflow Summary"
554+
# echo ""
555+
# echo "✅ PR has been created/updated for release ${{ env.RELEASE_TAG }}"
556+
# echo " - Proposal: ${{ env.PROPOSAL_FILE }}"
557+
# echo " - Release config: ${{ env.RELEASE_FILE }}"
558+
# echo " - Release notes: ${{ env.RELEASE_NOTES_FILE }}"
559+
# echo ""
560+
# echo "🔄 Configuration for this run:"
561+
# echo " - Release Tag: ${{ env.RELEASE_TAG }}"
562+
# echo " - Upgrade Height: ${{ env.CALCULATED_HEIGHT }}"
563+
# echo " - Deposit: ${{ env.DEPOSIT }}"
564+
# echo " - Expedited: ${{ env.EXPEDITED }}"
565+
# echo " - Run Number: ${{ github.run_number }}"
574566

scripts/generate-pr-body.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@
55

66
set -e
77

8+
echo "DEBUG: Environment variables in script:"
9+
echo " NETWORK_NAME from env: '${NETWORK_NAME}'"
10+
echo " MINTSCAN_CHAIN_ID from env: '${MINTSCAN_CHAIN_ID}'"
11+
812
# Function to generate Mintscan URLs
913
generate_mintscan_block_url() {
1014
local block_height="$1"
1115
local chain_id="$MINTSCAN_CHAIN_ID"
1216
echo "https://www.mintscan.io/${chain_id}/blocks/${block_height}"
1317
}
1418

15-
1619
generate_mintscan_proposal_url() {
1720
local proposal_id="$1"
1821
local chain_id="$MINTSCAN_CHAIN_ID"

0 commit comments

Comments
 (0)