WinRAR Keygen with secrets #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: | |
| name: Generating License (${{ github.event.inputs.KEY_ENCODING }}) | |
| 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 }} | |
| steps: | |
| - uses: actions/checkout@v7.0.0 | |
| - name: Generating License | |
| shell: pwsh | |
| run: | | |
| bin/x64-Release/winrar-keygen.exe "${{ env.KEY_USERNAME }}" "${{ env.KEY_LICENSE_NAME }}" -e ${{ env.KEY_ENCODING }} | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| 7z a rarreg.7z rarreg.key -p"${{ env.ZIP_PWD }}" | |
| - name: Uploading License | |
| uses: actions/upload-artifact@v7.0.1 | |
| with: | |
| name: rarreg_file_${{ env.KEY_ENCODING }} | |
| path: rarreg.7z | |
| if-no-files-found: error | |
| retention-days: 1 |