From c3f05b317ffe5e15a99d3b8d32a046f00931e56c Mon Sep 17 00:00:00 2001 From: furusax0621 Date: Fri, 30 Dec 2022 14:02:45 +0900 Subject: [PATCH 1/2] fix goreleaser warnings --- .gitignore | 2 ++ .goreleaser.yml | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 80d9d39..cd9b359 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ random_data_load* vendor/ bin/* dist/* + +dist/ diff --git a/.goreleaser.yml b/.goreleaser.yml index 5bcb12a..2c850f9 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -10,12 +10,12 @@ builds: - env: - CGO_ENABLED=0 archives: -- replacements: - darwin: Darwin - linux: Linux - windows: Windows - 386: i386 - amd64: x86_64 +- name_template: >- + {{ .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} checksum: name_template: 'checksums.txt' snapshot: From 7c295dee86cd7af45828e22fedf367fc46468586 Mon Sep 17 00:00:00 2001 From: furusax0621 Date: Fri, 30 Dec 2022 14:07:29 +0900 Subject: [PATCH 2/2] add release workflow --- .github/workflows/release.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..7dee2c5 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,30 @@ +name: release + +on: + push: + tags: + - "v*" + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: "1.19" + cache: true + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v4 + with: + distribution: goreleaser + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}