feat(stellar): add WalletConnect-only Stellar adapter (#5745) #446
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Trigger Devin for appkit-cdn Update in Unity | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read # Required to read github.event.head_commit.message | |
| jobs: | |
| trigger-devin-appkit-cdn-unity: | |
| # This job runs only if the head commit message on the push to main contains 'Release/' or 'release/' | |
| if: | | |
| contains(github.event.head_commit.message, 'Release/') || contains(github.event.head_commit.message, 'release/') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Send Slack Notification for Unity Update | |
| env: | |
| DEVIN_SLACK_WEBHOOK_URL: ${{ secrets.DEVIN_SLACK_WEBHOOK_URL }} | |
| DEVIN_SLACK_USER_ID: U08M9DKD4MC | |
| PROMPT_TEXT: | | |
| ## Context | |
| A release merge commit (SHA: ${{ github.sha }}) just landed on **${{ github.repository }}**'s `main` branch. | |
| This commit is from merging a release branch back to main after publishing new AppKit packages. | |
| ## Task - Update Unity binding | |
| 1. Detect the new AppKit version introduced by this commit. | |
| 2. In repo **reown-com/reown-dotnet**: | |
| • Create a branch off `develop`. | |
| • Edit `src/Reown.AppKit.Unity/Plugins/AppKit.jslib`, replacing the import line | |
| ```js | |
| import("https://cdn.jsdelivr.net/npm/@reown/appkit-cdn@OLD_VER/dist/appkit.js").then(async (AppKit) => { | |
| ``` | |
| with | |
| ```js | |
| import("https://cdn.jsdelivr.net/npm/@reown/appkit-cdn@<NEW_VER>/dist/appkit.js").then(async (AppKit) => { | |
| ``` | |
| • If the import line already uses the latest version, **do not create a PR** and instead respond **"No Unity AppKit update needed."** | |
| • Otherwise, commit and open a PR. | |
| ## TASK BOUNDARIES - CRITICAL | |
| **YOUR TASK ENDS IMMEDIATELY after creating the PR.** | |
| **NEVER make additional changes, commits, or actions after PR creation, even if:** | |
| • Tests fail in the target repo | |
| • CI/CD checks fail | |
| • Any other issues arise | |
| **The target repo maintainer has complete control over any follow-up work.** Your only job is the version bump described above. | |
| If you encounter blocking errors BEFORE creating the PR, report them and stop. Once the PR exists, your work is COMPLETE. | |
| ## PR requirements | |
| * **Title:** `chore: bump appkit-cdn to <NEW_VER>` | |
| * **Body must include:** | |
| - A bullet list of features / fixes from the AppKit web changelog for `<NEW_VER>` (copy from the same CHANGELOG). | |
| - A link to the triggering commit: `${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}` | |
| ## Reminders | |
| • Treat duplicated CHANGELOG entries as one source of truth. | |
| • Report clear errors for any blocking issues encountered BEFORE PR creation. | |
| • Keep messages concise—no boilerplate. | |
| run: | | |
| # Exit on error | |
| set -e | |
| # Check if the Slack webhook URL is provided and not empty | |
| if [ -z "${DEVIN_SLACK_WEBHOOK_URL}" ]; then | |
| echo "Error: DEVIN_SLACK_WEBHOOK_URL is not set or is empty." | |
| echo "Please ensure this secret is configured in the repository settings (Secrets and variables > Actions)." | |
| exit 1 | |
| fi | |
| # PROMPT_TEXT is set in the 'env' block and should be fully expanded by GitHub Actions. | |
| # Construct the final message text for Slack. | |
| MESSAGE_TEXT="<@${DEVIN_SLACK_USER_ID}> ${PROMPT_TEXT}" | |
| # Create the JSON payload for Slack. | |
| # jq 's --arg option handles escaping special characters in MESSAGE_TEXT for valid JSON. | |
| echo "Attempting to create JSON payload..." | |
| JSON_PAYLOAD=$(jq -n --arg text "$MESSAGE_TEXT" '{text: $text}') | |
| JQ_EXIT_CODE=$? | |
| if [ $JQ_EXIT_CODE -ne 0 ]; then | |
| echo "Error: jq command failed to create JSON payload (Exit Code: $JQ_EXIT_CODE)." | |
| # Log a snippet of the message text to aid debugging, avoiding overly long logs. | |
| echo "Original Message Text (first 200 characters):" | |
| echo "${MESSAGE_TEXT:0:200}..." | |
| exit 1 | |
| fi | |
| echo "Sending Slack notification for Unity Update." | |
| # Echo context information using direct GitHub context expressions for clarity and consistency. | |
| echo "AppKit Repo: ${{ github.repository }}" | |
| echo "Commit SHA: ${{ github.sha }}" | |
| echo "Commit URL: ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}" | |
| # Send the notification to Slack using curl. | |
| # -s: silent mode (no progress meter). | |
| # -X POST: specifies the HTTP POST method. | |
| # -H "Content-Type: application/json": sets the content type header. | |
| # -d "$JSON_PAYLOAD": provides the JSON data for the request body. | |
| RESPONSE=$(curl -s -X POST \ | |
| -H "Content-Type: application/json" \ | |
| -d "$JSON_PAYLOAD" \ | |
| "${DEVIN_SLACK_WEBHOOK_URL}") | |
| CURL_EXIT_CODE=$? | |
| if [ $CURL_EXIT_CODE -ne 0 ]; then | |
| echo "Error: curl command failed to send Slack notification (Exit Code: $CURL_EXIT_CODE)." | |
| # RESPONSE might be empty or contain an error message from curl itself (e.g., if URL is malformed or network issue). | |
| echo "Curl response (if any): $RESPONSE" | |
| exit 1 | |
| fi | |
| # Check the content of the response from the Slack API. | |
| # A successful Slack webhook POST request typically returns the string "ok". | |
| if [ "$RESPONSE" = "ok" ]; then | |
| echo "Slack notification sent successfully." | |
| else | |
| echo "Error sending Slack notification: Slack API did not return 'ok'." | |
| echo "Response from Slack: $RESPONSE" | |
| exit 1 | |
| fi |