mirror of
https://github.com/bitcookies/winrar-keygen.git
synced 2026-03-11 17:45:31 +00:00
102 lines
3.2 KiB
YAML
102 lines
3.2 KiB
YAML
name: WinRAR Keygen with secrets
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
KEY_ENCODING:
|
|
type: string
|
|
description: License encoding ascii, ansi or utf8
|
|
default: 'utf8'
|
|
required: true
|
|
|
|
jobs:
|
|
keygen-ascii:
|
|
name: Generating ASCII License
|
|
runs-on: windows-2022
|
|
env:
|
|
KEY_ENCODING: ${{ github.event.inputs.KEY_ENCODING }}
|
|
KEY_USERNAME: ${{secrets.TEXT1}}
|
|
KEY_LICENSE_NAME: ${{secrets.TEXT2}}
|
|
ZIP_PWD: ${{secrets.PWD}}
|
|
if: github.event.inputs.KEY_ENCODING == 'ascii'
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4.2.2
|
|
|
|
- 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
|
|
7z a rarreg.7z rarreg.key -p"${{env.ZIP_PWD}}"
|
|
|
|
- name: Uploading License
|
|
uses: actions/upload-artifact@v4.4.3
|
|
with:
|
|
name: rarreg_file_${{env.KEY_ENCODING}}
|
|
path: rarreg.7z
|
|
if-no-files-found: error
|
|
retention-days: 1
|
|
|
|
|
|
keygen-ansi:
|
|
name: Generating ANSI License
|
|
runs-on: windows-2022
|
|
env:
|
|
KEY_ENCODING: ${{ github.event.inputs.KEY_ENCODING }}
|
|
KEY_USERNAME: ${{secrets.TEXT1}}
|
|
KEY_LICENSE_NAME: ${{secrets.TEXT2}}
|
|
ZIP_PWD: ${{secrets.PWD}}
|
|
if: github.event.inputs.KEY_ENCODING == 'ansi'
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4.2.2
|
|
|
|
- name: Generating License (ANSI)
|
|
# Use PowerShell 7
|
|
shell: pwsh
|
|
run: |
|
|
[System.Text.Encoding]::Default
|
|
$OutputEncoding
|
|
bin/x64-Release/winrar-keygen.exe "${{env.KEY_USERNAME}}" "${{env.KEY_LICENSE_NAME}}" | Out-File -Encoding ${{env.KEY_ENCODING}} rarreg.key
|
|
7z a rarreg.7z rarreg.key -p"${{env.ZIP_PWD}}"
|
|
|
|
- name: Uploading License
|
|
uses: actions/upload-artifact@v4.4.3
|
|
with:
|
|
name: rarreg_file_${{env.KEY_ENCODING}}
|
|
path: rarreg.7z
|
|
if-no-files-found: error
|
|
retention-days: 1
|
|
|
|
|
|
keygen-uft8:
|
|
name: Generating UTF8 License
|
|
runs-on: windows-2022
|
|
env:
|
|
KEY_ENCODING: ${{ github.event.inputs.KEY_ENCODING }}
|
|
KEY_USERNAME: ${{secrets.TEXT1}}
|
|
KEY_LICENSE_NAME: ${{secrets.TEXT2}}
|
|
ZIP_PWD: ${{secrets.PWD}}
|
|
if: github.event.inputs.KEY_ENCODING == 'utf8'
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4.2.2
|
|
|
|
- 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
|
|
7z a rarreg.7z rarreg.key -p"${{env.ZIP_PWD}}"
|
|
|
|
- name: Uploading License
|
|
uses: actions/upload-artifact@v4.4.3
|
|
with:
|
|
name: rarreg_file_${{env.KEY_ENCODING}}
|
|
path: rarreg.7z
|
|
if-no-files-found: error
|
|
retention-days: 1
|