From 96319445f28f914efe18353df1474b6cc8878a7b Mon Sep 17 00:00:00 2001 From: F0rzend Date: Fri, 10 Jun 2022 14:22:12 +0300 Subject: [PATCH] :rocket: Added go-releaser --- .github/workflows/goreleaser.yml | 32 +++++++++++++++++++++++++++ .gitignore | 4 ++++ .goreleaser.yaml | 37 ++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 .github/workflows/goreleaser.yml create mode 100644 .goreleaser.yaml diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml new file mode 100644 index 0000000..4013ada --- /dev/null +++ b/.github/workflows/goreleaser.yml @@ -0,0 +1,32 @@ +name: goreleaser + +on: + push: + tags: + - 'v*' + +permissions: + contents: write + +jobs: + goreleaser: + 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.18 + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + distribution: goreleaser + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index c0a1b56..11a8097 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ .idea/ dumper.yml + +records/* +!records/.gitkeep +dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..f0c5fbe --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,37 @@ +before: + hooks: + - go mod tidy + - go test -v ./... + +gomod: + proxy: true + +universal_binaries: + - replace: false + +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + +archives: + - replacements: + darwin: MacOS + linux: Linux + windows: Windows + amd64: 64-bit + 386: 32-bit + all: Universal + + wrap_in_directory: true + + format_overrides: + - goos: windows + format: zip + +release: + mode: keep-existing + draft: true