mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-22 13:16:07 +03:00
update: release.yml (#1464)
* update: release.yml * update: release.yml
This commit is contained in:
parent
3db7d44fc2
commit
3b2ff95a9b
20
.github/workflows/release.yml
vendored
20
.github/workflows/release.yml
vendored
@ -169,18 +169,16 @@ jobs:
|
|||||||
command: |
|
command: |
|
||||||
cp ${GITHUB_WORKSPACE}/README.md ./build_assets/README.md
|
cp ${GITHUB_WORKSPACE}/README.md ./build_assets/README.md
|
||||||
cp ${GITHUB_WORKSPACE}/LICENSE ./build_assets/LICENSE
|
cp ${GITHUB_WORKSPACE}/LICENSE ./build_assets/LICENSE
|
||||||
LIST=('geoip geoip geoip' 'domain-list-community dlc geosite')
|
|
||||||
for i in "${LIST[@]}"
|
wget -O ./build_assets/geoip.dat "https://raw.githubusercontent.com/v2fly/geoip/release/geoip.dat"
|
||||||
do
|
|
||||||
INFO=($(echo $i | awk 'BEGIN{FS=" ";OFS=" "} {print $1,$2,$3}'))
|
|
||||||
LASTEST_TAG="$(curl -sL "https://api.github.com/repos/v2fly/${INFO[0]}/releases/latest" | jq -r ".tag_name" || echo "latest")"
|
|
||||||
FILE_NAME="${INFO[2]}.dat"
|
|
||||||
echo -e "Downloading https://github.com/v2fly/${INFO[0]}/releases/download/${LASTEST_TAG}/${INFO[1]}.dat..."
|
|
||||||
curl -L "https://github.com/v2fly/${INFO[0]}/releases/download/${LASTEST_TAG}/${INFO[1]}.dat" -o ./build_assets/${FILE_NAME}
|
|
||||||
echo -e "Verifying HASH key..."
|
echo -e "Verifying HASH key..."
|
||||||
HASH="$(curl -sL "https://github.com/v2fly/${INFO[0]}/releases/download/${LASTEST_TAG}/${INFO[1]}.dat.sha256sum" | awk -F ' ' '{print $1}')"
|
HASH="$(curl -sL "https://raw.githubusercontent.com/v2fly/geoip/release/geoip.dat.sha256sum" | awk -F ' ' '{print $1}')"
|
||||||
[ "$(sha256sum "./build_assets/${FILE_NAME}" | awk -F ' ' '{print $1}')" == "${HASH}" ] || { echo -e "The HASH key of ${FILE_NAME} does not match cloud one."; exit 1; }
|
[ "$(sha256sum "./build_assets/geoip.dat" | awk -F ' ' '{print $1}')" == "${HASH}" ] || { echo -e "The HASH key of geoip.dat does not match cloud one."; exit 1; }
|
||||||
done
|
|
||||||
|
wget -O ./build_assets/geosite.dat "https://raw.githubusercontent.com/v2fly/domain-list-community/release/dlc.dat"
|
||||||
|
echo -e "Verifying HASH key..."
|
||||||
|
HASH="$(curl -sL "https://raw.githubusercontent.com/v2fly/domain-list-community/release/dlc.dat.sha256sum" | awk -F ' ' '{print $1}')"
|
||||||
|
[ "$(sha256sum "./build_assets/geosite.dat" | awk -F ' ' '{print $1}')" == "${HASH}" ] || { echo -e "The HASH key of geosite.dat does not match cloud one."; exit 1; }
|
||||||
|
|
||||||
- name: Create ZIP archive
|
- name: Create ZIP archive
|
||||||
shell: bash
|
shell: bash
|
||||||
|
Loading…
Reference in New Issue
Block a user