diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 74f1c3fc..43fcd373 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,8 +1,5 @@ name: Build dlc.dat on: - pull_request: - branches: - - master push: branches: - master diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml new file mode 100644 index 00000000..96fd18c6 --- /dev/null +++ b/.github/workflows/test-pr.yml @@ -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