generated from AnimMouse/torrent-webseed-creator
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (52 loc) · 1.97 KB
/
py3createtorrent.yaml
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
57
name: py3createtorrent
on:
workflow_dispatch:
inputs:
name:
description: Name of the torrent file
required: true
default: Firefox Setup 122.0.1
comment:
description: Comment
required: true
default: Firefox Setup 122.0.1 win64 en-US by torrent-webseed-creator
url:
description: URL of the file
required: true
default: https://download-installer.cdn.mozilla.net/pub/firefox/releases/122.0.1/win64/en-US/Firefox%20Setup%20122.0.1.exe
file_name:
description: File name of the file in the torrent
required: true
default: Firefox Setup 122.0.1.exe
piece_size:
description: Piece Size. Use 0 for automatic calculation, or use the recommended piece size on the README.md file
required: true
default: 0
maximize_disk_space:
description: Maximize disk space. Check if getting out of disk space error
type: boolean
jobs:
create_torrent:
runs-on: ubuntu-latest
steps:
- name: Maximize disk space
if: inputs.maximize_disk_space
uses: easimon/maximize-build-space@v10
with:
remove-dotnet: true
remove-android: true
remove-haskell: true
remove-codeql: true
remove-docker-images: true
- name: Install py3createtorrent
run: pipx install py3createtorrent
- name: Download file
run: aria2c -x 16 -o "${{ inputs.file_name }}" "${{ inputs.url }}"
- name: Create torrent using py3createtorrent
run: py3createtorrent -p "${{ inputs.piece_size }}" -c "${{ inputs.comment }}" -s "torrent-webseed-creator" -o "${{ inputs.name }}.torrent" --webseed "${{ inputs.url }}" "${{ inputs.file_name }}"
- name: Upload torrent file
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.name }}
path: ${{ inputs.name }}.torrent
compression-level: 0