Skip to content
This repository was archived by the owner on Apr 14, 2025. It is now read-only.

Commit 5b22e87

Browse files
committed
adding goreleaser
1 parent 89a3629 commit 5b22e87

File tree

2 files changed

+26
-37
lines changed

2 files changed

+26
-37
lines changed

.github/workflows/build.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,28 @@ jobs:
7878
name: ${{ steps.tag_version.outputs.new_tag }}
7979
body: ${{ steps.tag_version.outputs.changelog }}
8080
token: ${{ secrets.RELEASES_ACTION_GITHUB_TOKEN }}
81+
82+
goreleaser:
83+
needs: build
84+
name: Build and publish binaries
85+
if: ${{ github.ref == 'refs/heads/palm-migration' }}
86+
runs-on: ubuntu-latest
87+
88+
steps:
89+
- uses: actions/checkout@v3
90+
with:
91+
fetch-depth: 0
92+
- run: git fetch --force --tags
93+
- uses: actions/setup-go@v4
94+
with:
95+
go-version: stable
96+
# More assembly might be required: Docker logins, GPG, etc. It all depends
97+
# on your needs.
98+
- uses: goreleaser/goreleaser-action@v4
99+
with:
100+
# either 'goreleaser' (default) or 'goreleaser-pro':
101+
distribution: goreleaser
102+
version: latest
103+
args: release --clean
104+
env:
105+
GITHUB_TOKEN: ${{ secrets.RELEASES_ACTION_GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -95,40 +95,4 @@ archives:
9595
# amd64: x86_64
9696

9797
snapshot:
98-
name_template: "{{ .Tag }}.next"
99-
100-
dockers:
101-
- image_templates:
102-
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-amd64
103-
dockerfile: Dockerfile.release
104-
use: buildx
105-
goarch: amd64
106-
ids:
107-
- linux-amd64
108-
build_flag_templates:
109-
- --platform=linux/amd64
110-
skip_push: false
111-
112-
- image_templates:
113-
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-arm64
114-
dockerfile: Dockerfile.release
115-
use: buildx
116-
goarch: arm64
117-
ids:
118-
- linux-arm64
119-
build_flag_templates:
120-
- --platform=linux/arm64
121-
skip_push: false
122-
123-
docker_manifests:
124-
- name_template: 0xpolygon/{{ .ProjectName }}:{{ .Version }}
125-
image_templates:
126-
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-amd64
127-
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-arm64
128-
skip_push: false
129-
130-
- name_template: 0xpolygon/{{ .ProjectName }}:latest
131-
image_templates:
132-
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-amd64
133-
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-arm64
134-
skip_push: auto
98+
name_template: "{{ .Tag }}.next"

0 commit comments

Comments
 (0)