Add Github Actions with secrets

Add Github Actions with secrets @quyentruong
This commit is contained in:
bitcookies 2022-01-13 11:05:29 +08:00
parent 96ba2c7e1d
commit b957f7afe8
2 changed files with 40 additions and 5 deletions

View file

@ -1,7 +1,6 @@
name: WinRAR Keygen name: WinRAR Keygen
on: on:
workflow_dispatch:
push: push:
branches: [ master ] branches: [ master ]
paths: paths:
@ -13,15 +12,29 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
steps: 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 - name: Generate key
shell: powershell 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 - name: Upload key
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2.3.1
with: with:
name: rarreg_file name: rarreg_file
path: rarreg.key path: rarreg.key
retention-days: 90 retention-days: 90

22
.github/workflows/action_secrets.yml vendored Normal file
View file

@ -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