Skip to content

Commit

Permalink
调整构建逻辑,移除无效文件
Browse files Browse the repository at this point in the history
  • Loading branch information
metowolf committed Feb 6, 2025
1 parent 8896a97 commit 488bc4e
Show file tree
Hide file tree
Showing 12 changed files with 3,374 additions and 15 deletions.
24 changes: 9 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Builder
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
path: build
ref: build
version: 9
- name: Checkout Data
uses: actions/checkout@v4
with:
path: data
ref: master
- name: Set up S3cmd cli tool
uses: s3-actions/[email protected]
with:
Expand All @@ -26,22 +21,21 @@ jobs:
access_key: ${{ secrets.S3_ACCESS_KEY }}
secret_key: ${{ secrets.S3_SECRET_KEY }}
account_id: ${{ secrets.S3_ACCOUNT_ID }}
- name: Set Timezone
uses: szenius/[email protected]
with:
timezoneLinux: "Asia/Shanghai"
- name: Parse
run: |
s3cmd get s3://openipdb/openipdb.ipdb /tmp/openipdb.ipdb
ls -al /tmp/openipdb.ipdb
cd build
yarn install
yarn build
rm -r ./data
pnpm install
pnpm run build
- name: Push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd ./data
cp -r ../build/data/cncity/* ./data/cncity/
cp -r ../build/data/country/* ./data/country/
cp -r ../build/data/special/* ./data/special/
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to the output on this push; exiting."
exit 0
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 构建工具
node_modules/

# 排除台湾省区划细分
!data/cncity/710000.txt
data/cncity/7*
24 changes: 24 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "iplist",
"version": "1.0.0",
"scripts": {
"build": "npm run gulp build",
"gulp": "npx --max-old-space-size=8092 gulp --gulpfile src/gulpfile.js --cwd ./",
"test": "npm run gulp test"
},
"repository": "[email protected]:metowolf/iplist.git",
"author": "metowolf <[email protected]>",
"license": "MIT",
"private": true,
"dependencies": {
"@ipdb/range": "^0.1.1",
"cidr-tools": "^3.0.5",
"glob": "^7.2.3",
"gulp": "^4.0.2",
"gulp-debug": "^4.0.0",
"ipdb": "^0.3.3",
"progress": "^2.0.3",
"through2": "^4.0.2",
"yaml": "^1.10.2"
}
}
Loading

0 comments on commit 488bc4e

Please sign in to comment.