Skip to content

Commit

Permalink
adding goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
hexoscott committed Sep 14, 2023
1 parent 89a3629 commit 5b22e87
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 37 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,28 @@ jobs:
name: ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
token: ${{ secrets.RELEASES_ACTION_GITHUB_TOKEN }}

goreleaser:
needs: build
name: Build and publish binaries
if: ${{ github.ref == 'refs/heads/palm-migration' }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: actions/setup-go@v4
with:
go-version: stable
# More assembly might be required: Docker logins, GPG, etc. It all depends
# on your needs.
- uses: goreleaser/goreleaser-action@v4
with:
# either 'goreleaser' (default) or 'goreleaser-pro':
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.RELEASES_ACTION_GITHUB_TOKEN }}
38 changes: 1 addition & 37 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,40 +95,4 @@ archives:
# amd64: x86_64

snapshot:
name_template: "{{ .Tag }}.next"

dockers:
- image_templates:
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-amd64
dockerfile: Dockerfile.release
use: buildx
goarch: amd64
ids:
- linux-amd64
build_flag_templates:
- --platform=linux/amd64
skip_push: false

- image_templates:
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-arm64
dockerfile: Dockerfile.release
use: buildx
goarch: arm64
ids:
- linux-arm64
build_flag_templates:
- --platform=linux/arm64
skip_push: false

docker_manifests:
- name_template: 0xpolygon/{{ .ProjectName }}:{{ .Version }}
image_templates:
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-amd64
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-arm64
skip_push: false

- name_template: 0xpolygon/{{ .ProjectName }}:latest
image_templates:
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-amd64
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-arm64
skip_push: auto
name_template: "{{ .Tag }}.next"

0 comments on commit 5b22e87

Please sign in to comment.