5656 });
5757 }
5858
59+ build_iana_punched :
60+ if : github.event_name == 'push' || github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && (inputs.run_build == 'true' || inputs.run_cron == 'true'))
61+ uses : ./.github/workflows/build-iana-punched.yml
62+ with :
63+ private_src_repo_slug : ${{ vars.POPTRIE_PRIVATE_REPO_SLUG }}
64+ private_src_ref : ${{ vars.POPTRIE_PRIVATE_REPO_REF || 'main' }}
65+ secrets :
66+ iana_private_repo_token : ${{ secrets.HARMONSIR_IANA_GEOIP_REPO_TOKEN }}
67+ poptrie_private_repo_token : ${{ secrets.GH_POPTRIE_TOKEN }}
68+
5969 build :
6070 runs-on : ${{ matrix.os }}
6171 if : github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.run_build == 'true')
@@ -154,7 +164,7 @@ jobs:
154164
155165 release :
156166 runs-on : ubuntu-latest
157- needs : build
167+ needs : [ build, build_iana_punched ]
158168 permissions :
159169 contents : write
160170 if : github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.run_build == 'true')
@@ -249,22 +259,32 @@ jobs:
249259 --iana-zip-url "https://github.com/HotCakeX/Official-IANA-IP-blocks/archive/refs/heads/main.zip" \
250260 --out-cn dist/geo-cn.dat \
251261 --out-geoip dist/bgp-geoip.dat \
252- --out-iana dist/iana-geoip.dat
262+ --out-iana dist/iana-geoip-std.dat
263+
264+ - name : Download punched iana dat
265+ uses : actions/download-artifact@v7
266+ continue-on-error : false
267+ with :
268+ name : iana-punched-dat
269+ path : dist
253270
254271 - name : Publish latest release
255272 uses : softprops/action-gh-release@v2
256273 with :
257274 tag_name : latest
258275 name : latest
259276 generate_release_notes : true
277+ fail_on_unmatched_files : false
260278 files : |
261279 dist/*.whl
262280 dist/geo-cn.dat
263281 dist/bgp-geoip.dat
264282 dist/iana-geoip.dat
283+ dist/iana-geoip-std.dat
265284
266285 cron_release :
267286 runs-on : ubuntu-latest
287+ needs : build_iana_punched
268288 permissions :
269289 contents : write
270290 if : github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.run_cron == 'true')
@@ -303,7 +323,14 @@ jobs:
303323 --iana-zip-url "https://github.com/HotCakeX/Official-IANA-IP-blocks/archive/refs/heads/main.zip" \
304324 --out-cn dist/geo-cn.dat \
305325 --out-geoip dist/bgp-geoip.dat \
306- --out-iana dist/iana-geoip.dat
326+ --out-iana dist/iana-geoip-std.dat
327+
328+ - name : Download punched iana dat
329+ uses : actions/download-artifact@v7
330+ continue-on-error : false
331+ with :
332+ name : iana-punched-dat
333+ path : dist
307334
308335 - name : Set release tag
309336 run : echo "CRON_TAG=cron-$(date -u +%Y%m%d)" >> $GITHUB_ENV
@@ -313,6 +340,7 @@ jobs:
313340 with :
314341 tag_name : ${{ env.CRON_TAG }}
315342 name : ${{ env.CRON_TAG }}
343+ fail_on_unmatched_files : false
316344 files : |
317345 dist/geo-cn.dat
318346 dist/bgp-geoip.dat
0 commit comments