-
Notifications
You must be signed in to change notification settings - Fork 2.3k
107 lines (91 loc) · 3.45 KB
/
keygen.yml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: WinRAR Keygen
on:
workflow_dispatch:
inputs:
KEY_ENCODING:
type: string
description: License encoding ascii, ansi or utf8
default: 'utf8'
required: true
KEY_USERNAME:
type: string
description: Input your username
required: true
KEY_LICENSE_NAME:
type: string
description: Input your license name
default: 'Single PC usage license'
required: true
jobs:
keygen-ascii:
name: Generating ASCII License
runs-on: windows-2022
env:
KEY_ENCODING: ${{ github.event.inputs.KEY_ENCODING }}
KEY_USERNAME: ${{ github.event.inputs.KEY_USERNAME }}
KEY_LICENSE_NAME: ${{ github.event.inputs.KEY_LICENSE_NAME }}
if: github.event.inputs.KEY_ENCODING == 'ascii'
steps:
- uses: actions/checkout@v4.1.5
- name: Generating License (ASCII)
# Do Not Use pwsh
shell: powershell
run: |
$OutputEncoding = [console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding
$PSVersionTable.PSVersion
bin/x64-Release/winrar-keygen.exe "${{env.KEY_USERNAME}}" "${{env.KEY_LICENSE_NAME}}" | Out-File -Encoding ${{env.KEY_ENCODING}} rarreg.key
- name: Uploading License
uses: actions/upload-artifact@v4.3.3
with:
name: rarreg_file_${{env.KEY_ENCODING}}
path: rarreg.key
if-no-files-found: error
retention-days: 90
keygen-ansi:
name: Generating ANSI License
runs-on: windows-2022
env:
KEY_ENCODING: ${{ github.event.inputs.KEY_ENCODING }}
KEY_USERNAME: ${{ github.event.inputs.KEY_USERNAME }}
KEY_LICENSE_NAME: ${{ github.event.inputs.KEY_LICENSE_NAME }}
if: github.event.inputs.KEY_ENCODING == 'ansi'
steps:
- uses: actions/checkout@v4.1.5
- name: Generating License (ANSI)
shell: pwsh
run: |
$OutputEncoding = [console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding
$OutputEncoding
bin/x64-Release/winrar-keygen.exe "${{env.KEY_USERNAME}}" "${{env.KEY_LICENSE_NAME}}"
bin/x64-Release/winrar-keygen.exe "${{env.KEY_USERNAME}}" "${{env.KEY_LICENSE_NAME}}" | Out-File -Encoding ${{env.KEY_ENCODING}} rarreg.key
- name: Uploading License
uses: actions/upload-artifact@v4.3.3
with:
name: rarreg_file_${{env.KEY_ENCODING}}
path: rarreg.key
if-no-files-found: error
retention-days: 90
keygen-uft8:
name: Generating UTF8 License
runs-on: windows-2022
env:
KEY_ENCODING: ${{ github.event.inputs.KEY_ENCODING }}
KEY_USERNAME: ${{ github.event.inputs.KEY_USERNAME }}
KEY_LICENSE_NAME: ${{ github.event.inputs.KEY_LICENSE_NAME }}
if: github.event.inputs.KEY_ENCODING == 'utf8'
steps:
- uses: actions/checkout@v4.1.5
- name: Generating License (UTF-8)
# Do Not Use pwsh
shell: powershell
run: |
$OutputEncoding = [console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding
$PSVersionTable.PSVersion
bin/x64-Release/winrar-keygen.exe "utf8:${{env.KEY_USERNAME}}" "${{env.KEY_LICENSE_NAME}}" | Out-File -Encoding ${{env.KEY_ENCODING}} rarreg.key
- name: Uploading License
uses: actions/upload-artifact@v4.3.3
with:
name: rarreg_file_${{env.KEY_ENCODING}}
path: rarreg.key
if-no-files-found: error
retention-days: 90