-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: clean closed connection cache (#1)
* Fix: clean connection cache Signed-off-by: Zzde <[email protected]> * fix actions Signed-off-by: Zzde <[email protected]> * Add checkout Signed-off-by: Zzde <[email protected]> * Fixed Signed-off-by: Zzde <[email protected]> --------- Signed-off-by: Zzde <[email protected]>
- Loading branch information
Showing
5 changed files
with
74 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Build And Releases | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
tags: | ||
- v* | ||
|
||
# Run tests for any PRs. | ||
pull_request: | ||
permissions: | ||
contents: write # publishing releases | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
check-latest: true | ||
go-version: "1.20" | ||
|
||
- name: Build | ||
run: make -j releases | ||
|
||
- name: Upload Releases Files | ||
if: startsWith(github.ref, 'refs/tags/') | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: "*.tar.gz" | ||
draft: true | ||
|
||
- name: clean | ||
run: make clean |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,9 +11,6 @@ on: | |
tags: | ||
- v* | ||
|
||
# Run tests for any PRs. | ||
pull_request: | ||
|
||
env: | ||
IMAGE_NAME: clash-exporter | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,5 @@ | |
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
|
||
.DS_Store |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
NAME=clash-exporter | ||
VERSION=$(shell git describe --tags --always) | ||
|
||
releases: darwin-amd64 darwin-arm64 linux-amd64 linux-arm64 linux-armv6 linux-armv7 | ||
|
||
darwin-amd64: | ||
GOOS=darwin GOARCH=amd64 go build -o $(NAME)-${VERSION}-$@ | ||
tar czf $(NAME)-${VERSION}-$@.tar.gz $(NAME)-${VERSION}-$@ | ||
darwin-arm64: | ||
GOOS=darwin GOARCH=arm64 go build -o $(NAME)-${VERSION}-$@ | ||
tar czf $(NAME)-${VERSION}-$@.tar.gz $(NAME)-${VERSION}-$@ | ||
linux-amd64: | ||
GOOS=linux GOARCH=amd64 go build -o $(NAME)-${VERSION}-$@ | ||
tar czf $(NAME)-${VERSION}-$@.tar.gz $(NAME)-${VERSION}-$@ | ||
linux-arm64: | ||
GOOS=linux GOARCH=arm64 go build -o $(NAME)-${VERSION}-$@ | ||
tar czf $(NAME)-${VERSION}-$@.tar.gz $(NAME)-${VERSION}-$@ | ||
linux-armv6: | ||
GOOS=linux GOARCH=arm GOARM=6 go build -o $(NAME)-${VERSION}-$@ | ||
tar czf $(NAME)-${VERSION}-$@.tar.gz $(NAME)-${VERSION}-$@ | ||
linux-armv7: | ||
GOOS=linux GOARCH=arm GOARM=7 go build -o $(NAME)-${VERSION}-$@ | ||
tar czf $(NAME)-${VERSION}-$@.tar.gz $(NAME)-${VERSION}-$@ | ||
|
||
clean: | ||
rm -rf $(NAME)-* |
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