Test PR using GitHub Actions (#1115)

This commit is contained in:
IceCodeNew 2022-08-23 16:53:58 +08:00 committed by GitHub
parent 0efb7bb975
commit 01cf4eb29f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 3 deletions

View File

@ -1,8 +1,5 @@
name: Build dlc.dat
on:
pull_request:
branches:
- master
push:
branches:
- master

32
.github/workflows/test-pr.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: Test PR
on:
pull_request:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Set variables
run: |
echo "RELEASE_NAME=$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV
echo "TAG_NAME=$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV
shell: bash
- name: Checkout codebase
uses: actions/checkout@v3
with:
path: code
- name: Build dlc.dat file
run: |
cd code || exit 1
go run ./ --outputdir=../ --exportlists=category-ads-all,tld-cn,cn,tld-\!cn,geolocation-\!cn,apple,icloud
cd ../ && rm -rf code