Fix add ring/release_type selection option (#284)

* fix add ring/build_type selection option

* Add "insider fast" channel for downloading wsa

* Edit release_type description
This commit is contained in:
zhongfly 2022-03-31 11:16:00 +08:00 committed by GitHub
parent 02dfb76dfe
commit b5dd805d13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@ on:
- arm64 - arm64
- x64 & arm64 - x64 & arm64
release_type: release_type:
description: "WSA Build type" description: "WSA release type"
required: true required: true
default: "retail" default: "retail"
type: choice type: choice
@ -26,6 +26,7 @@ on:
- retail - retail
- release preview - release preview
- insider slow - insider slow
- insider fast
magisk_apk: magisk_apk:
description: "Magisk version" description: "Magisk version"
required: true required: true
@ -110,9 +111,10 @@ jobs:
import urllib.request import urllib.request
arch = "${{ matrix.arch }}" arch = "${{ matrix.arch }}"
build_type_map = {"retail": "Retail", "release preview": "RP", "insider slow": "WIS"} release_type_map = {"retail": "Retail", "release preview": "RP", "insider slow": "WIS", "insider fast": "WIF"}
release_type = release_type_map["${{ github.event.inputs.release_type }}"] if "${{ github.event.inputs.release_type }}" != "" else "Retail"
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={ res = requests.post("https://store.rg-adguard.net/api/GetFiles", f"type=CategoryId&url=858014f3-3934-4abe-8078-4aa193e74ca8&ring={release_type}&lang=en-US", headers={
"content-type": "application/x-www-form-urlencoded" "content-type": "application/x-www-form-urlencoded"
}) })
html = BeautifulSoup(res.content, "lxml") html = BeautifulSoup(res.content, "lxml")