From 3b2ff95a9ba5bf9715df3d1af9bd229b730121b5 Mon Sep 17 00:00:00 2001 From: thank243 Date: Fri, 30 Dec 2022 11:34:49 +0800 Subject: [PATCH] update: release.yml (#1464) * update: release.yml * update: release.yml --- .github/workflows/release.yml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 71fb2000..07856a60 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -169,18 +169,16 @@ jobs: command: | cp ${GITHUB_WORKSPACE}/README.md ./build_assets/README.md cp ${GITHUB_WORKSPACE}/LICENSE ./build_assets/LICENSE - LIST=('geoip geoip geoip' 'domain-list-community dlc geosite') - for i in "${LIST[@]}" - 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..." - HASH="$(curl -sL "https://github.com/v2fly/${INFO[0]}/releases/download/${LASTEST_TAG}/${INFO[1]}.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; } - done + + wget -O ./build_assets/geoip.dat "https://raw.githubusercontent.com/v2fly/geoip/release/geoip.dat" + echo -e "Verifying HASH key..." + HASH="$(curl -sL "https://raw.githubusercontent.com/v2fly/geoip/release/geoip.dat.sha256sum" | awk -F ' ' '{print $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; } + + 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 shell: bash