-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
184 additions
and
31 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,41 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- | ||
name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16 | ||
- | ||
name: Cache Go modules | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- | ||
name: Tests | ||
run: | | ||
go mod tidy | ||
- | ||
name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
if: success() && startsWith(github.ref, 'refs/tags/') | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,20 @@ | ||
plugins | ||
judas | ||
|
||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
/.idea/ | ||
/dist/ |
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,46 @@ | ||
# This is an example goreleaser.yaml file with some sane defaults. | ||
# Make sure to check the documentation at http://goreleaser.com | ||
# https://goreleaser.com/customization/build/ | ||
project_name: proxycheck | ||
gomod: | ||
proxy: true | ||
builds: | ||
- env: [CGO_ENABLED=0] | ||
binary: proxycheck | ||
main: ./main.go | ||
ldflags: | ||
- -s -w -X main.Version={{.Version}} -X main.Commit={{.ShortCommit}} -X main.Date={{.Date}} -X main.Branch={{.Branch}} | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- 386 | ||
- arm64 | ||
ignore: | ||
- goos: darwin | ||
goarch: 386 | ||
archives: | ||
- | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
nfpms: | ||
- maintainer: becivells | ||
description: judas | ||
homepage: https://github.com/Becivells/wsproxycheck | ||
license: MIT | ||
formats: | ||
- deb | ||
- rpm |
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,35 @@ | ||
.DEFAULT_GOAL:=help | ||
|
||
COLOR_ENABLE=$(shell tput colors > /dev/null; echo $$?) | ||
ifeq "$(COLOR_ENABLE)" "0" | ||
CRED:=$(shell tput setaf 1 2>/dev/null) | ||
CGREEN:=$(shell tput setaf 2 2>/dev/null) | ||
CYELLOW:=$(shell tput setaf 3 2>/dev/null) | ||
CBLUE:=$(shell tput setaf 4 2>/dev/null) | ||
CMAGENTA:=$(shell tput setaf 5 2>/dev/null) | ||
CCYAN:=$(shell tput setaf 6 2>/dev/null) | ||
CWHITE:=$(shell tput setaf 7 2>/dev/null) | ||
CEND:=$(shell tput sgr0 2>/dev/null) | ||
endif | ||
.PHONY: build | ||
build: ## build snapshot | ||
@echo "$(CGREEN)build snapshot no publish ...$(CEND)" | ||
@goreleaser build --snapshot --rm-dist | ||
|
||
.PHONY: snapshot | ||
snapshot: ## pre snapshot | ||
@echo "$(CGREEN)release snapshot no publish ...$(CEND)" | ||
@goreleaser release --skip-publish --snapshot --rm-dist | ||
.PHONY: release | ||
release: ## release no publish | ||
@echo "$(CGREEN)release no publish ...$(CEND)" | ||
@goreleaser release --skip-publish --rm-dist | ||
|
||
.PHONY: clean | ||
clean: ## clean up | ||
@echo "$(CGREEN)clean up dist ...$(CEND)" | ||
@rm -rf ./dist | ||
.PHONY: help | ||
help: ## Show this help. | ||
@echo "$(CGREEN)project$(CEND)" | ||
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make $(CYELLOW)<target>$(CEND) (default: help)\n\nTargets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " $(CCYAN)%-12s$(CEND) %s\n", $$1, $$2 }' $(MAKEFILE_LIST) |
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
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