Chore: script built

This commit is contained in:
yaling888
2021-10-21 20:22:23 +08:00
parent cbea46b0c8
commit 63d07db4bf
17 changed files with 139 additions and 249 deletions

View File

@ -29,6 +29,26 @@ jobs:
- name: Get dependencies, run test and static check
run: |
# fetch python cross compile source files
mkdir -p bin/python/
cd bin/python/
curl -LO https://raw.githubusercontent.com/yaling888/snack/main/python-3.9.7-darwin-amd64.tar.xz
curl -LO https://raw.githubusercontent.com/yaling888/snack/main/python-3.9.7-darwin-arm64.tar.xz
curl -LO https://raw.githubusercontent.com/yaling888/snack/main/python-3.9.7-windows-amd64.tar.xz
curl -LO https://raw.githubusercontent.com/yaling888/snack/main/python-3.9.7-windows-386.tar.xz
curl -LO https://raw.githubusercontent.com/yaling888/snack/main/python-3.9.7-linux-amd64.tar.xz
curl -LO https://raw.githubusercontent.com/yaling888/snack/main/python-3.9.7-linux-arm64.tar.xz
#curl -LO https://raw.githubusercontent.com/yaling888/snack/main/python-3.9.7-linux-386.tar.xz
tar -Jxf python-3.9.7-darwin-amd64.tar.xz
tar -Jxf python-3.9.7-darwin-arm64.tar.xz
tar -Jxf python-3.9.7-windows-amd64.tar.xz
tar -Jxf python-3.9.7-windows-386.tar.xz
tar -Jxf python-3.9.7-linux-amd64.tar.xz
tar -Jxf python-3.9.7-linux-arm64.tar.xz
#tar -Jxf python-3.9.7-linux-386.tar.xz
rm python-3.9.7-*.tar.xz
cd ../../
go test ./...
go vet ./...
go install honnef.co/go/tools/cmd/staticcheck@latest
@ -41,6 +61,8 @@ jobs:
- name: SSH connection to Actions
uses: P3TERX/ssh2actions@v1.0.0
if: github.actor == github.repository_owner && contains(github.event.head_commit.message, '[ssh]')
env:
SSH_PASSWORD: ${{ secrets.ADAWADLHIOH }}
- name: Build
#if: startsWith(github.ref, 'refs/tags/')
@ -48,11 +70,12 @@ jobs:
NAME: clash
BINDIR: bin
run: |
make cleancache && make -j releases
make -j releases
- name: Prepare upload
if: startsWith(github.ref, 'refs/tags/') == false
run: |
rm -rf bin/python/
echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV
echo "FILE_SHA=$(git describe --tags --always 2>/dev/null)" >> $GITHUB_ENV
@ -83,6 +106,6 @@ jobs:
with:
keep_latest: 1
delete_tags: true
delete_tag_pattern: premium
delete_tag_pattern: plus-pro
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}