Skip to content

Commit c0a66cf

Browse files
authored
Use a simpler uploader that can replace assets.
1 parent 873a7f8 commit c0a66cf

File tree

1 file changed

+4
-30
lines changed

1 file changed

+4
-30
lines changed

.github/workflows/geoip.yml

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,45 +6,19 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
release:
10-
runs-on: ubuntu-latest
11-
outputs:
12-
id: ${{ steps.latest_release_info.outputs.id }}
13-
upload_url: ${{ steps.latest_release_info.outputs.upload_url }}
14-
steps:
15-
- name: Gets latest created release info
16-
id: latest_release_info
17-
uses: jossef/[email protected]
18-
env:
19-
GITHUB_TOKEN: ${{ secrets.GEOIP_TOKEN }}
20-
219
download:
2210
name: Cache GeoIP database
2311
runs-on: ubuntu-latest
24-
needs: release
2512
steps:
2613
- name: Clone repository
2714
uses: actions/checkout@v2
2815

2916
- name: Fetch GeoIP from ip2location.
3017
run: ./fetch-geoip.sh
3118

32-
- name: Delete old release assets
33-
uses: flcdrg/[email protected]
34-
id: remove
35-
env:
36-
GITHUB_TOKEN: ${{ secrets.GEOIP_TOKEN }}
37-
with:
38-
release_id: ${{ needs.release.outputs.id }}
39-
asset_name: IP2LOCATION-LITE-DB1.IPV6.BIN.1.ZIP
40-
4119
- name: Upload release asset
42-
id: upload-release-asset
43-
uses: actions/upload-release-asset@v1
44-
env:
45-
GITHUB_TOKEN: ${{ secrets.GEOIP_TOKEN }}
20+
uses: cb80/pubrel@latest
4621
with:
47-
upload_url: https://github.com/OpenRA/GeoIP-Database/releases/download/49852973/assets?name=IP2LOCATION-LITE-DB1.IPV6.BIN.1.ZIP
48-
asset_path: ./IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP
49-
asset_name: IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP
50-
asset_content_type: application/zip
22+
replace: latest
23+
token: ${{ secrets.GEOIP_TOKEN }}
24+
files: IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP

0 commit comments

Comments
 (0)