Skip to content

Commit

Permalink
first release
Browse files Browse the repository at this point in the history
  • Loading branch information
vrichv committed Dec 2, 2024
1 parent e6379ba commit 11280f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 32 deletions.
37 changes: 6 additions & 31 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,39 +42,14 @@ jobs:
bash extract.sh
ls -l cn-domain*
- name: List files
run: pwd && ls -R domain-list-community/data/cn-domain*

- name: Create a release
- name: Release
if: ${{ env.NeedToSync }}
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.TAG_NAME }}
release_name: ${{ env.RELEASE_NAME }}
draft: false
prerelease: false

- name: Upload assets
if: ${{ env.NeedToSync }}
uses: actions/upload-release-asset@v1
name: ${{ env.RELEASE_NAME }}
files: |
domain-list-community/data/cn-domain.txt
domain-list-community/data/cn-domain-agh.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: domain-list-community/data/cn-domain.txt
asset_name: cn-domain.txt
asset_content_type: text/plain

- name: Upload assets 2
if: ${{ env.NeedToSync }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: domain-list-community/data/cn-domain-agh.txt
asset_name: cn-domain-agh.txt
asset_content_type: text/plain
2 changes: 1 addition & 1 deletion extract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ grep -v "\.cn" "$temp_file" |grep -v "^#"|grep -v "@ads" |grep -v ":" |grep -v "
sed -i 's/@cn//g' "$temp_file2"
cat "$temp_file2" | while read domain; do echo "$domain" | rev | cut -d. -f1-2 | rev; done | sort -u >"$temp_file"
(echo -n "[/"; tr '\n' '/' < "$temp_file"; echo "]https://223.5.5.5/dns-query") > cn-domain-agh.txt
mv "$temp_file" "cn-domains.txt"
mv "$temp_file" "cn-domain.txt"

count=$(wc -l < cn-domains.txt)
echo "Processed $count unique domains"

0 comments on commit 11280f6

Please sign in to comment.