Skip to content

Commit e5e3067

Browse files
authored
Depend on download to enforce order.
1 parent 928291a commit e5e3067

File tree

1 file changed

+30
-16
lines changed

1 file changed

+30
-16
lines changed

.github/workflows/geoip.yml

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,41 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
build:
9+
download:
1010
name: Cache GeoIP database
1111
runs-on: ubuntu-20.04
1212

1313
steps:
14-
- name: Clone Repository
15-
uses: actions/checkout@v2
14+
- name: Clone Repository
15+
uses: actions/checkout@v2
1616

17-
- name: Fetch GeoIP from ip2location.
18-
id: wait-for-fetch
19-
run: ./fetch-geoip.sh
17+
- name: Fetch GeoIP from ip2location.
18+
run: ./fetch-geoip.sh
2019

21-
- name: Wait for download.
22-
if: steps.wait-for-fetch.outputs.conclusion == 'success'
23-
with:
24-
token: ${{ secrets.GEOIP_TOKEN }}
20+
upload:
21+
name: Upload GeoIP database
22+
runs-on: ubuntu-20.04
23+
needs: download
2524

26-
- name: Release
27-
uses: softprops/action-gh-release@v1
28-
with:
29-
files: IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP
25+
steps:
26+
- name: Create Release
27+
id: create_release
28+
uses: actions/create-release@v1
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GEOIP_TOKEN }}
31+
with:
3032
tag_name: monthly
31-
repository: OpenRA/GeoIP-Database
32-
token: ${{ secrets.GEOIP_TOKEN }}
33+
release_name: IP2Location™ LITE IP-COUNTRY Database
34+
draft: false
35+
prerelease: false
36+
37+
- name: Upload Release Asset
38+
id: upload-release-asset
39+
uses: actions/upload-release-asset@v1
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GEOIP_TOKEN }}
42+
with:
43+
upload_url: ${{ steps.create_release.outputs.upload_url }}
44+
asset_path: ./IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP
45+
asset_name: IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP
46+
asset_content_type: application/zip

0 commit comments

Comments
 (0)