diff options
| author | 世界 <[email protected]> | 2022-07-05 09:12:35 +0800 |
|---|---|---|
| committer | 世界 <[email protected]> | 2022-07-05 09:13:57 +0800 |
| commit | d80854f8573dee9ddfcae711caad903f1267774f (patch) | |
| tree | e289d16abff25b918e68c071a3b0c1371ea7fded /.github/workflows | |
| parent | 782ba35a59910fb14191a53d7b7cc198d82139d8 (diff) | |
Add debug workflow
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/build.yaml | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..430a677 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,36 @@ +name: Build +on: + push: + branches: + - main +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Get latest go version + id: version + run: | + echo ::set-output name=go_version::$(curl -s https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json | grep -oE '"version": "[0-9]{1}.[0-9]{1,}(.[0-9]{1,})?"' | head -1 | cut -d':' -f2 | sed 's/ //g; s/"//g') + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: ${{ steps.version.outputs.go_version }} + - name: Build geosite + id: build + env: + GOPRIVATE: github.com/sagernet + ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} + NO_SKIP: true + run: | + git config --global url."https://${{ secrets.ACCESS_TOKEN }}@github.com".insteadOf "https://github.com" + go run -v . + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: geosite.db + path: geosite.db
\ No newline at end of file |
