Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/evo-tool-download-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Update Dash Evo Tool download links

on:
repository_dispatch:
types: [release_published]
workflow_dispatch: # This allows the workflow to be triggered manually
schedule: # Run daily at midnight UTC
- cron: 0 0 * * *

jobs:
update-evo-tool-download-links:
runs-on: ubuntu-latest

steps:
- name: Checkout this repository
uses: actions/checkout@v4

- name: Run evo tool download link update script
run: "${GITHUB_WORKSPACE}/scripts/evo-tool-download-link-update.sh"

- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
branch: update-docs/${{ github.sha }}
title: "chore: update evo tool download links to latest version"
body: |
This PR updates download links in the documentation to use the latest Dash Evo Tool version.
10 changes: 5 additions & 5 deletions docs/user/network/dash-evo-tool/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ Linux, MacOS, or Windows packages are available on the `GitHub releases page
<https://github.com/dashpay/dash-evo-tool/releases/latest>`__. Download the zip file for your
Operating System, then unzip the downloaded file:

* `Windows <https://github.com/dashpay/dash-evo-tool/releases/download/v0.3.1/dash-evo-tool-windows.zip>`_
* `Mac (ARM m1-m4) <https://github.com/dashpay/dash-evo-tool/releases/download/v0.3.1/dash-evo-tool-arm64-mac.zip>`_
* `Mac (x86) <https://github.com/dashpay/dash-evo-tool/releases/download/v0.3.1/dash-evo-tool-x86_64-mac.zip>`_
* `Linux (x86) <https://github.com/dashpay/dash-evo-tool/releases/download/v0.3.1/dash-evo-tool-x86_64-linux.zip>`_
* `Linux (ARM) <https://github.com/dashpay/dash-evo-tool/releases/download/v0.3.1/dash-evo-tool-arm64-linux.zip>`_
* `Windows <https://github.com/dashpay/dash-evo-tool/releases/download/v0.4.0/dash-evo-tool-windows.zip>`_
* `Mac (ARM m1-m4) <https://github.com/dashpay/dash-evo-tool/releases/download/v0.4.0/dash-evo-tool-arm64-mac.zip>`_
* `Mac (x86) <https://github.com/dashpay/dash-evo-tool/releases/download/v0.4.0/dash-evo-tool-x86_64-mac.zip>`_
* `Linux (x86) <https://github.com/dashpay/dash-evo-tool/releases/download/v0.4.0/dash-evo-tool-x86_64-linux.zip>`_
* `Linux (ARM) <https://github.com/dashpay/dash-evo-tool/releases/download/v0.4.0/dash-evo-tool-arm64-linux.zip>`_

.. _evo-tool-configure:

Expand Down
23 changes: 23 additions & 0 deletions scripts/evo-tool-download-link-update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

# Script to update the download/install related version references when a new
# Dash Evo Tool version is released

# Command to get latest Dash Evo Tool tag name
NEW_VERSION=$(curl -s \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/dashpay/dash-evo-tool/releases/latest | \
jq -r '.tag_name' | sed 's/^v//')

if [[ $? -ne 0 || -z "$NEW_VERSION" ]]; then
echo "Error: Unexpected response when retrieving the current version. Received: $NEW_VERSION"
else
# Print the extracted values (for verification)
echo "Extracted Version: $NEW_VERSION"
# git checkout -b v$NEW_VERSION-links # Uncomment to use locally

# Use the variables in the find/sed commands
find . -iname "*.rst" -exec sed -i "s~https://github\.com/dashpay/dash-evo-tool/releases/download/v[0-9]\+\.[0-9]\+\.[0-9]\+~https://github.com/dashpay/dash-evo-tool/releases/download/v${NEW_VERSION}~g" {} +

echo "Dash Evo Tool version updated to ${NEW_VERSION} in documentation"
fi