diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 161233e..465069d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,29 +15,13 @@ jobs: run: | echo "RELEASE_NAME=Released on $(date +%Y.%m.%d-%H:%M)" >> $GITHUB_ENV echo "TAG_NAME=$(date +%Y%m%d%H%M)" >> $GITHUB_ENV - echo "custom_rules=https://raw.githubusercontent.com/$GITHUB_REPOSITORY/main/rules.txt" >> $GITHUB_ENV - ls -al - for x in $(find $pwd -name "*rules.txt" | xargs ls -d); - do - echo ${x} - file=${x#*./} - echo "${file%.txt}=https://raw.githubusercontent.com/$GITHUB_REPOSITORY/main/${file}" >> $GITHUB_ENV; - done - shell: bash - name: Generate rules.txt file run: | - ls -al - echo "payload:" > rules.txt - curl -sSL ${custom_rules} | grep -Ev "^(regexp|keyword):" | perl -ne '/^(domain:|full:)?([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print " - |+.$2|\n"' | sed "s/|/'/g" >> rules.txt - # curl -sSL ${microsoft_rules} > microsoft-rules.txt - # curl -sSL ${global_network_rules} > global-network-rules.txt - # curl -sSL ${domestic_media_rules} > domestic-media-rules.txt - # curl -sSL ${foreign_media_rules} > foreign-media-rules.txt - # curl -sSL ${blacklist_rules} > blacklist-rules.txt - for x in $(find $pwd -name "*rules.txt" | xargs ls -d); - do + for x in $(find $pwd -name "*rules.txt" | xargs ls -d); do echo ${x} + file=${x#*./} + curl -sSL "https://raw.githubusercontent.com/$GITHUB_REPOSITORY/main/${file}" > ${file} done - name: Move files to publish directory