rootmelo92118 46c31280af
Update test-pr.yml (#1141)
* Update test-pr.yml

I think we can provide the file which has been generated to the contributor. It has two reasons. First, the contributor can get the file as soon as possible. At the same time, it will not influence other users before we merge it. Second, the contributor will test the part which has been changed by himself/herself. If he/she gets any problem, he/she can fix it before we find it.

* Update test-pr.yml

* Update test-pr.yml

* Update test-pr.yml

* Update test-pr.yml

* Update test-pr.yml

* Update test-pr.yml
2022-09-02 20:08:02 +08:00

40 lines
1.0 KiB
YAML

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
mv dlc.dat TEST-${{ github.run_number }}-dlc.dat
- name: Upload TEST-${{ github.run_number }}-dlc.dat
uses: actions/upload-artifact@v3
with:
name: TEST-${{ github.run_number }}-dlc.dat
path: TEST-${{ github.run_number }}-dlc.dat