Add ring/build_type selection option for WSA (#283)

close #278
This commit is contained in:
ISHANSH LAL 2022-03-31 06:10:43 +05:30 committed by GitHub
parent 6bd1cbcbc1
commit 02dfb76dfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,15 @@ on:
- x64
- arm64
- x64 & arm64
release_type:
description: "WSA Build type"
required: true
default: "retail"
type: choice
options:
- retail
- release preview
- insider slow
magisk_apk:
description: "Magisk version"
required: true
@ -101,8 +110,9 @@ jobs:
import urllib.request
arch = "${{ matrix.arch }}"
build_type_map = {"retail": "Retail", "release preview": "RP", "insider slow": "WIS"}
res = requests.post("https://store.rg-adguard.net/api/GetFiles", "type=CategoryId&url=858014f3-3934-4abe-8078-4aa193e74ca8&ring=WIS&lang=en-US", headers={
res = requests.post("https://store.rg-adguard.net/api/GetFiles", "type=CategoryId&url=858014f3-3934-4abe-8078-4aa193e74ca8&ring={ build_type_map[github.event.inputs.release_type] }&lang=en-US", headers={
"content-type": "application/x-www-form-urlencoded"
})
html = BeautifulSoup(res.content, "lxml")