Skip to content

v2.1.0_2025.4.2

v2.1.0_2025.4.2 #21

Workflow file for this run

name: Update README with Nightly Builds
on:
release:
types: [published, edited] # Triggers on new releases and modifications
workflow_dispatch: # Allows manual execution
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Fetch releases from GitHub API
id: fetch-releases
run: |
echo "Fetching releases..."
releases=$(curl -s "https://api.github.com/repos/${{ github.repository }}/releases?per_page=100" | jq '[.[] | select(.draft == false)] | sort_by(.published_at) | reverse')
echo "$releases" > releases.json
latest=$(echo "$releases" | jq '.[0]')
latest_tag=$(echo "$latest" | jq -r '.tag_name')
latest_date=$(echo "$latest" | jq -r '.published_at' | cut -d'T' -f1)
assets=$(echo "$latest" | jq -c '.assets')
echo "LATEST_TAG=$latest_tag" >> $GITHUB_ENV
echo "LATEST_DATE=$latest_date" >> $GITHUB_ENV
echo "LATEST_ASSETS=$assets" >> $GITHUB_ENV
- name: Generate Latest Release Section
id: latest-release
run: |
echo "## Nightly Builds" > README.md
echo "" >> README.md
echo "### Latest ($LATEST_DATE)" >> README.md
echo "| Platform | Installer Type | Download Link |" >> README.md
echo "|--------------------------|-------------------|--------------|" >> README.md
echo "$LATEST_ASSETS" | jq -r '.[] | select(.browser_download_url != null) |
"| " +
if (.name | test("win.*exe$")) then "**Windows x64** | Installer (.exe)"
elif (.name | test("win.*zip$")) then "**Windows x64** | Portable (.zip)"
elif (.name | test("amd64.*deb$")) then "**Linux (Ubuntu/Debian)** | Installer (amd64) (.deb)"
elif (.name | test("arm64.*deb$")) then "**Linux (Ubuntu/Debian)** | Installer (arm64) (.deb)"
elif (.name | test("x86_64.*AppImage$")) then "**Linux (AppImage)** | Portable (x86_64)"
elif (.name | test("arm64.*AppImage$")) then "**Linux (AppImage)** | Portable (arm64)"
elif (.name | test("x86_64.*rpm$")) then "**Linux (RPM - Fedora/RedHat)** | Installer (x86_64) (.rpm)"
elif (.name | test("aarch64.*rpm$")) then "**Linux (RPM - Fedora/RedHat)** | Installer (aarch64) (.rpm)"
elif (.name | test("arm64.*mac.*dmg$")) then "**Mac Apple Silicon** | Installer (.dmg)"
elif (.name | test("arm64.*mac.*zip$")) then "**Mac Apple Silicon** | Portable (.zip)"
elif (.name | test("x64.*mac.*dmg$")) then "**Mac x64** | Installer (.dmg)"
elif (.name | test("x64.*mac.*zip$")) then "**Mac x64** | Portable (.zip)"
else empty end +
" | [🔗 Download](" + .browser_download_url + ") |"' >> README.md
echo "" >> README.md
echo "---" >> README.md
echo "" >> README.md
- name: Generate Previous Releases Section
id: previous-releases
run: |
echo "<details>" >> README.md
echo " <summary>Previous Releases</summary>" >> README.md
echo "" >> README.md
releases=$(cat releases.json)
echo "$releases" | jq -c '.[] | select(.tag_name != env.LATEST_TAG)' | while read -r release; do
tag=$(echo "$release" | jq -r '.tag_name')
date=$(echo "$release" | jq -r '.published_at' | cut -d'T' -f1)
assets=$(echo "$release" | jq -c '.assets')
echo "### $tag ($date)" >> README.md
echo "| Platform | Installer Type | Download Link |" >> README.md
echo "|----------|---------------|--------------|" >> README.md
echo "$assets" | jq -r '.[] | select(.browser_download_url != null) |
"| " +
if (.name | test("win.*exe$")) then "**Windows x64** | Installer (.exe)"
elif (.name | test("win.*zip$")) then "**Windows x64** | Portable (.zip)"
elif (.name | test("amd64.*deb$")) then "**Linux (Ubuntu/Debian)** | Installer (amd64) (.deb)"
elif (.name | test("arm64.*deb$")) then "**Linux (Ubuntu/Debian)** | Installer (arm64) (.deb)"
elif (.name | test("x86_64.*AppImage$")) then "**Linux (AppImage)** | Portable (x86_64)"
elif (.name | test("arm64.*AppImage$")) then "**Linux (AppImage)** | Portable (arm64)"
elif (.name | test("x86_64.*rpm$")) then "**Linux (RPM - Fedora/RedHat)** | Installer (x86_64) (.rpm)"
elif (.name | test("aarch64.*rpm$")) then "**Linux (RPM - Fedora/RedHat)** | Installer (aarch64) (.rpm)"
elif (.name | test("arm64.*mac.*dmg$")) then "**Mac Apple Silicon** | Installer (.dmg)"
elif (.name | test("arm64.*mac.*zip$")) then "**Mac Apple Silicon** | Portable (.zip)"
elif (.name | test("x64.*mac.*dmg$")) then "**Mac x64** | Installer (.dmg)"
elif (.name | test("x64.*mac.*zip$")) then "**Mac x64** | Portable (.zip)"
else empty end +
" | [🔗 Download](" + .browser_download_url + ") |"' >> README.md
echo "" >> README.md
done
echo "</details>" >> README.md
- name: Commit and Push Changes
run: |
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
git add README.md
git commit -m "Update README with latest nightly builds" || echo "No changes to commit"
git push