mirror of
https://github.com/egor-white/zaprett.git
synced 2025-12-31 15:50:38 +05:00
51 lines
1.4 KiB
YAML
51 lines
1.4 KiB
YAML
name: Build module
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: 'Tag for the release'
|
|
required: true
|
|
type: string
|
|
release_name:
|
|
description: 'Release Name'
|
|
required: true
|
|
type: string
|
|
release_notes:
|
|
description: 'Release Description'
|
|
required: true
|
|
type: string
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Make build dirs
|
|
run: mkdir -p zaprett zaprett-extended zaprett-tv zapret-latest out
|
|
|
|
- name: Download latest zapret binaries
|
|
run: |
|
|
LATEST_RELEASE=$(curl -s https://api.github.com/repos/bol-van/zapret/releases/latest)
|
|
DOWNLOAD_URL=$(echo "$LATEST_RELEASE" | grep -o 'browser_download_url.*zapret-v.*\.zip"' | cut -d'"' -f3)
|
|
wget $DOWNLOAD_URL -O zapret-latest.zip
|
|
|
|
- name: Unzip zapret binaries
|
|
run: |
|
|
unzip -o zapret-latest.zip
|
|
ZAPRET_DIR=$(find . -maxdepth 1 -type d -name 'zapret-v*' | head -n 1)
|
|
if [ "$(ls -A "$ZAPRET_DIR")" ]; then
|
|
mv "$ZAPRET_DIR"/* zapret-latest/
|
|
else
|
|
echo "Warning: $ZAPRET_DIR is empty"
|
|
fi
|
|
rm -rf "${ZAPRET_DIR}"
|
|
rm zapret-latest.zip
|
|
- name: Debug
|
|
run: |
|
|
ls -la zapret-latest
|
|
ls -la $GITHUB_WORKSPACE
|
|
|
|
|
|
|