-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit af15d59
Showing
9 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: release | ||
on: | ||
schedule: | ||
- cron: "0 0 * * 3" | ||
|
||
env: | ||
ACTION_FILENAME: release.yml | ||
TARGET: v2fly/geoip | ||
REQUIRED_FILES: | | ||
cn.dat | ||
geoip.dat | ||
geoip-only-cn-private.dat | ||
private.dat | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check and release | ||
run: | | ||
TARGET_TAG_URL="https://api.github.com/repos/$TARGET/releases/latest" | ||
TARGET_LATEST_VER=`curl -s ${TARGET_TAG_URL} --connect-timeout 30| grep 'tag_name' | cut -d\" -f4` | ||
TARGET_DIST_URLs=`curl -s ${TARGET_TAG_URL} --connect-timeout 30| grep 'browser_download_url' | cut -d\" -f4` | ||
DIST_TAGS_URL="https://api.github.com/repos/${{ github.repository }}/tags" | ||
DIST_TAG_FOUND=`curl -s ${DIST_TAGS_URL} --connect-timeout 30| grep "\"name\"\: \"${TARGET_LATEST_VER}\""` || true | ||
if [ -z ${DIST_TAG_FOUND} ]; then | ||
echo $TARGET_DIST_URLs|while read -r line;do wget $line &> /dev/null;done | ||
echo $REQUIRED_FILES|while read -r line;do ls $line;done | ||
mkdir -p .github/workflows | ||
wget -O .github/workflows/release.yml https://github.com/${{ github.repository }}/raw/master/.github/workflows/$ACTION_FILENAME | ||
git init | ||
git add . | ||
git config --local user.name "${{ github.actor }}" | ||
git config --local user.email "${{ github.actor }}@users.noreply.github.com" | ||
git commit -m "Version ${TARGET_LATEST_VER}" | ||
git tag -a "${TARGET_LATEST_VER}" -m "Version ${TARGET_LATEST_VER}" | ||
git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}" | ||
git push -u --force --follow-tags origin master | ||
fi | ||
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
8fe14b01c00f1f2170b131163eea3fdbfb4750f8a0bd8773605c9f373af66448 cn.dat |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bc158cc74c3ba7eeb32f8ad3d4dc4c422d18f60ffecd02d5badf9b91cba6bb09 geoip-only-cn-private.dat |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
40459c103cabb9edd6902004237c0bb0b8c03d3d60ea22f81f43b0e7a6b2fbde geoip.dat |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ac5f6df7cf67c2f19e42f7bacdecdff7660671eab164af91633399517af00b73 private.dat |