ci: separate android runner, github release download, telegram notifications and release upload

Reviewed-on: https://code.gri.mw/GUI/grim/pulls/33
This commit is contained in:
ardocrat
2026-01-23 11:20:15 +01:00
parent 00f8eb7d18
commit 7ebfaaf477
16 changed files with 253 additions and 80 deletions
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
HOST=https://code.gri.mw
REPO_NAME=$1
TAG=$2
DOWNLOAD_URL=${HOST}/${REPO_NAME}/releases/download/${TAG}
FILES=( "grim-${TAG}-android.apk" "grim-${TAG}-android-x86_64.apk" "grim-${TAG}-linux-arm.AppImage" "grim-${TAG}-linux-x86_64.AppImage" "grim-${TAG}-macos-arm.zip" "grim-${TAG}-macos-x86_64.zip" "grim-${TAG}-macos-universal.zip" "grim-${TAG}-win-x86_64.zip" )
# Download release files
for f in "${FILES[@]}"; do
wget -q ${DOWNLOAD_URL}/${f}
echo Downloading ${f}...
while [ ! -f ${f} ]; do
sleep 5
echo Retry ${f}...
wget -q ${DOWNLOAD_URL}/${f}
done
done
# Save release notes
INFO_URL=${HOST}/api/v1/repos/${REPO_NAME}/releases/tags/${TAG}
curl -s "${INFO_URL}" | jq -r '.body' > release_notes.txt
+32
View File
@@ -0,0 +1,32 @@
name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
create_release:
name: Create Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download release
run: chmod +x .github/download_release.sh && .github/download_release.sh ${{ github.repository }} ${{ github.ref_name }}
- name: Release
uses: softprops/action-gh-release@v2
with:
body_path: release_notes.txt
overwrite_files: true
files: |
grim-${{ github.ref_name }}-android.apk
grim-${{ github.ref_name }}-android-x86_64.apk
grim-${{ github.ref_name }}-linux-arm.AppImage
grim-${{ github.ref_name }}-linux-x86_64.AppImage
grim-${{ github.ref_name }}-macos-arm.zip
grim-${{ github.ref_name }}-macos-x86_64.zip
grim-${{ github.ref_name }}-macos-universal.zip
grim-${{ github.ref_name }}-win-x86_64.zip