v2fly-domain-list-community/.github/workflows/build.yml
2020-02-09 18:00:25 +08:00

45 lines
1.1 KiB
YAML

name: Build geosite.dat
on:
schedule:
- cron: "0 0 * * 3"
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Setup Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go
- name: Set $GOPATH and more variables
run: |
echo "::set-env name=NAME::$(date +%Y%m%d%H%M)"
echo "::set-env name=TAG_NAME::$(date +%Y%m%d%H%M)"
echo "::set-env name=GOPATH::$(dirname $GITHUB_WORKSPACE)"
echo "::set-env name=REPO_URL::github.com/v2ray/domain-list-community"
echo "::add-path::$(dirname $GITHUB_WORKSPACE)/bin"
shell: bash
- name: Get geosite code
run: |
go get -u -v -insecure $REPO_URL
- name: Build geosite.dat file
run: |
domain-list-community
mkdir -p ./publish
mv ./dlc.dat ./publish/dlc.dat
- name: Release file
uses: Ricky-Hao/action-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ASSET_PATH: publish