proxies support direct
type
#493
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: [push] | |
jobs: | |
build: | |
permissions: write-all | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
job: | |
- { target: "linux-386 linux-amd64 linux-amd64-v3", id: "1" } | |
- { target: "linux-armv5 linux-armv6 linux-armv7", id: "2" } | |
- { target: "linux-arm64 linux-mips64 linux-mips64le", id: "3" } | |
- { target: "linux-mips-softfloat linux-mips-hardfloat linux-mipsle-softfloat linux-mipsle-hardfloat", id: "4" } | |
- { target: "freebsd-386 freebsd-amd64 freebsd-amd64-v3 freebsd-arm64", id: "5" } | |
- { target: "windows-amd64 windows-amd64-v3 windows-386", id: "6" } | |
- { target: "windows-arm64 windows-armv7", id: "7" } | |
- { target: "darwin-amd64 darwin-amd64-v3 darwin-arm64", id: "8" } | |
steps: | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
check-latest: true | |
go-version: "1.21" | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Set variables | |
run: echo "VERSION=$(git describe --tags)" >> $GITHUB_ENV | |
shell: bash | |
- name: Get dependencies, run test | |
if: ${{ matrix.job.id=='1' }} | |
run: | | |
go test ./... | |
- name: Update Country.mmdb | |
run: | | |
cd component/mmdb | |
rm Country.mmdb | |
wget -O Country.mmdb https://raw.githubusercontent.com/Loyalsoldier/geoip/release/Country-only-cn-private.mmdb | |
# wget -O Country.mmdb https://raw.githubusercontent.com/JMVoid/ipip2mmdb/release/Country.mmdb | |
- name: Build | |
# if: startsWith(github.ref, 'refs/tags/') | |
env: | |
NAME: clashr | |
BINDIR: bin | |
run: | | |
make -j$(($(nproc) + 1)) ${{ matrix.job.target }} | |
cd bin | |
ls -la | |
chmod +x * | |
cp ../.github/release.sh ./ | |
bash ./release.sh | |
rm ./release.sh | |
ls -la | |
cd .. | |
- name: Update Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bin | |
path: bin/ | |
- name: Upload Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: bin/* | |
draft: true |