-
Notifications
You must be signed in to change notification settings - Fork 11
56 lines (49 loc) · 1.7 KB
/
Copy pathworkflow.yml
File metadata and controls
56 lines (49 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# This is a basic workflow to help you get started with Actions
name: Build module
# Controls when the workflow will run
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:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
# Runs a single command using the runners shell
- name: Prepare
run: mkdir -p zaprett zaprett-extended zaprett-tv out
# Runs a set of commands using the runners shell
- 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