@ayesh/geo-ip-database 1.1.20230811 → 1.1.20230813

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ayesh/geo-ip-database",
3
- "version": "1.1.20230811",
3
+ "version": "1.1.20230813",
4
4
  "description": "Weekly updated database of IP CIDR to Country codes, indexed by the first 1/4th of the IP address",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -15,6 +15,9 @@
15
15
  "maxmind",
16
16
  "ip2location"
17
17
  ],
18
+ "files": [
19
+ "/data"
20
+ ],
18
21
  "author": "Ayesh Karunaratne",
19
22
  "license": "CC-BY-NC-SA-4.0"
20
23
  }
package/.gitattributes DELETED
@@ -1,11 +0,0 @@
1
- # https://php.watch/articles/composer-gitattributes
2
-
3
- # Exclude build/test files from archive
4
- /.github export-ignore
5
- /.gitattributes export-ignore
6
- /.gitignore export-ignore
7
- /.npmignore export-ignore
8
-
9
- # Configure diff output for .php and .phar files.
10
- *.php diff=php
11
- *.phar -diff
@@ -1,75 +0,0 @@
1
- name: Update GeoIP Database
2
- on:
3
- workflow_dispatch:
4
- schedule:
5
- - cron: '5 4 */3 * *'
6
-
7
- jobs:
8
- build:
9
-
10
- strategy:
11
- matrix:
12
- php-versions: ['8.2']
13
- runs-on: ubuntu-latest
14
-
15
- steps:
16
-
17
- - name: Checkout
18
- uses: actions/checkout@v3
19
- with:
20
- ref: ${{ github.head_ref }}
21
-
22
-
23
- - name: Setup PHP, with composer and extensions
24
- uses: shivammathur/setup-php@v2
25
- with:
26
- php-version: ${{ matrix.php-versions }}
27
-
28
- - name: Install dependencies
29
- run: |
30
- git config --global --add safe.directory /github/workspace
31
- rm -rf vendor/bin
32
- composer install --no-progress --prefer-dist
33
-
34
- - name: Download and setup database
35
- run: |
36
- mkdir input
37
- wget -O db.zip "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country-CSV&license_key=${{ secrets.MAXMIND_LICENSE_KEY }}&suffix=zip"
38
- unzip db.zip -d input
39
- rm db.zip
40
- mv input/*/*.csv input/ -f
41
- ls input
42
-
43
- - name: Process database
44
- run: |
45
- git config --global --add safe.directory '*'
46
- php vendor/ayesh/geo-ip-tree-builder/run.php input/GeoLite2-Country-Blocks-IPv4.csv input/GeoLite2-Country-Locations-en.csv data
47
- git status
48
-
49
- - name: Get current date
50
- id: date
51
- run: |
52
- echo "::set-output name=date::$(date +'%Y%m%d')"
53
- echo "Update database ${{steps.date.outputs.date}}"
54
-
55
- - name: Update composer and npm package versions
56
- run: |
57
- npm --no-git-tag-version version "v1.1.${{steps.date.outputs.date}}"
58
-
59
- - name: Commit and tag if changed
60
- uses: stefanzweifel/git-auto-commit-action@v4
61
- with:
62
- commit_message: "Update database ${{steps.date.outputs.date}}"
63
- tagging_message: "v1.1.${{steps.date.outputs.date}}"
64
- branch: main
65
-
66
- - uses: actions/setup-node@v3
67
- with:
68
- node-version: '16.x'
69
- registry-url: 'https://registry.npmjs.org'
70
-
71
- - name: "Publish npm releases"
72
- run: |
73
- npm publish
74
- env:
75
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/composer.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- "name": "ayesh/geo-ip-database",
3
- "description": "Weekly updated database of IP CIDR to Country codes, indexed by the first 1/4th of the IP address",
4
- "type": "library",
5
- "license": "CC-BY-NC-SA-4.0",
6
- "authors": [
7
- {
8
- "name": "Ayesh Karunaratne",
9
- "email": "ayesh@aye.sh"
10
- }
11
- ],
12
- "require-dev": {
13
- "ayesh/geo-ip-tree-builder": "^1.1.0"
14
- }
15
- }