diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ad3997e..50b8efa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,10 +1,9 @@ name: Build Release on: - push: - branches: [ master ] - pull_request: - branches: [ master ] + create: + tags: + - v* jobs: build: @@ -25,9 +24,8 @@ jobs: run: go build -v . - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 - if: startsWith(github.ref, 'refs/tags/') with: version: latest args: release --rm-dist env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/.gitignore b/.gitignore index 2ac5bf6..728823b 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,5 @@ .vscode goproject.code-workspace helloworld.go.bak + +dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..c4092b7 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,75 @@ +# This is an example .goreleaser.yml file with some sensible defaults. +# Make sure to check the documentation at https://goreleaser.com +before: + hooks: + # You may remove this if you don't use go modules. + - go mod tidy + # you may remove this if you don't need go generate + - go generate ./... +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + - freebsd + - openbsd + goarch: + - 386 + - amd64 + - arm + - arm64 + - mips + - mips64 + - mipsle + - mips64le + goarm: + - 6 + - 7 + gomips: + - hardfloat + - softfloat + ignore: + - goos: darwin + goarch: 386 + - goos: darwin + goarch: arm + - goos: darwin + goarch: mips + - goos: darwin + goarch: mips64 + - goos: darwin + goarch: mipsle + - goos: darwin + goarch: mips64le + + - goos: windows + goarch: mips + - goos: windows + goarch: mips64 + - goos: windows + goarch: mipsle + - goos: windows + goarch: mips64le + +archives: + - format: binaries + replacements: + darwin: Darwin + freebsd: Freebsd + linux: Linux + openbsd: Openbsd + windows: Windows + 386: i386 + amd64: x86_64 +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ incpatch .Version }}" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' diff --git a/README.md b/README.md index 332689c..fba2a27 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ ```bash $ ./acmeDeliver -h -acmeDeliver version: 0.1.0 +acmeDeliver version: 1.0 Usage: acmeDeliver [-h] [-p port] [-d dirname] [-k password] [-t time] [-b address] [-tls] [-tlsport port] [-cert filename] [-key filename] Options: