From b957f7afe86999e4d601aecedbecfef7311a90c2 Mon Sep 17 00:00:00 2001 From: bitcookies Date: Thu, 13 Jan 2022 11:05:29 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20Github=20Actions=20with=20sec?= =?UTF-8?q?rets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add Github Actions with secrets @quyentruong --- .github/workflows/action.yml | 23 ++++++++++++++++++----- .github/workflows/action_secrets.yml | 22 ++++++++++++++++++++++ 2 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/action_secrets.yml diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index b3d4830..e374714 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -1,7 +1,6 @@ name: WinRAR Keygen on: - workflow_dispatch: push: branches: [ master ] paths: @@ -13,15 +12,29 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2.4.0 + + - name: Get key text1 + id: text1 + uses: notiz-dev/github-action-json-property@release + with: + path: 'keygen/info.json' + prop_path: 'text1' + + - name: Get key text2 + id: text2 + uses: notiz-dev/github-action-json-property@release + with: + path: 'keygen/info.json' + prop_path: 'text2' - name: Generate key shell: powershell - run: bin/x64-Release/winrar-keygen.exe "${{secrets.TEXT1}}" "${{secrets.TEXT2}}" | out-file -encoding ascii rarreg.key + run: bin/x64-Release/winrar-keygen.exe "${{steps.text1.outputs.prop}}" "${{steps.text2.outputs.prop}}" | out-file -encoding ascii rarreg.key - name: Upload key - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v2.3.1 with: name: rarreg_file path: rarreg.key - retention-days: 90 + retention-days: 90 \ No newline at end of file diff --git a/.github/workflows/action_secrets.yml b/.github/workflows/action_secrets.yml new file mode 100644 index 0000000..71da16e --- /dev/null +++ b/.github/workflows/action_secrets.yml @@ -0,0 +1,22 @@ +name: WinRAR Keygen Secrets + +on: workflow_dispatch + +jobs: + build: + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2.4.0 + + - name: Generate key + shell: powershell + run: bin/x64-Release/winrar-keygen.exe "${{secrets.TEXT1}}" "${{secrets.TEXT2}}" | out-file -encoding ascii rarreg.key + + - name: Upload key + uses: actions/upload-artifact@v2.3.1 + with: + name: rarreg_file + path: rarreg.key + retention-days: 90 \ No newline at end of file