2019-12-10 15:40:58 +08:00
|
|
|
name: Build V2Ray rules dat files
|
2019-12-11 05:04:30 +08:00
|
|
|
on: [push]
|
|
|
|
# schedule:
|
|
|
|
# - cron: "0 0 */1 * *"
|
2019-12-10 17:28:39 +08:00
|
|
|
|
2019-12-10 15:40:58 +08:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build
|
2019-12-10 17:17:09 +08:00
|
|
|
runs-on: ubuntu-latest
|
2019-12-10 19:28:01 +08:00
|
|
|
|
2019-12-10 15:40:58 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2019-12-10 16:30:22 +08:00
|
|
|
rule: [geoip, geosite]
|
2019-12-10 15:40:58 +08:00
|
|
|
include:
|
|
|
|
- rule: geoip
|
|
|
|
artifact_name: geoip.dat
|
|
|
|
asset_name: geoip.dat
|
|
|
|
- rule: geosite
|
|
|
|
artifact_name: geosite.dat
|
|
|
|
asset_name: geosite.dat
|
2019-12-10 17:28:39 +08:00
|
|
|
|
2019-12-10 15:40:58 +08:00
|
|
|
steps:
|
|
|
|
- name: Set up Go 1.13
|
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
|
|
|
go-version: 1.13
|
|
|
|
id: go
|
|
|
|
|
2019-12-11 02:56:31 +08:00
|
|
|
- name: Check out code into the Go module directory
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
|
2019-12-11 05:36:17 +08:00
|
|
|
- name: Generate geoip.dat and geosite.dat file
|
2019-12-10 15:40:58 +08:00
|
|
|
run: |
|
|
|
|
chmod +x generate-rules-dat.sh
|
|
|
|
./generate-rules-dat.sh
|
2019-12-10 17:28:39 +08:00
|
|
|
|
2019-12-10 15:40:58 +08:00
|
|
|
- name: Upload dat files to release
|
|
|
|
uses: svenstaro/upload-release-action@v1-release
|
|
|
|
with:
|
2019-12-11 03:20:38 +08:00
|
|
|
file: /home/runner/work/v2ray-rules-dat/v2ray-rules-dat/v2ray/${{ matrix.artifact_name }}
|
2019-12-10 15:40:58 +08:00
|
|
|
asset_name: ${{ matrix.asset_name }}
|
2019-12-11 05:36:17 +08:00
|
|
|
tag: latest
|
2019-12-10 15:40:58 +08:00
|
|
|
overwrite: true
|
|
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|