Skip to content

Commit

Permalink
Fix goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
kalverra committed Jan 23, 2025
1 parent 5c2f4bd commit d4ac2fa
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Parrotserver Release
on:
push:
tags:
- parrotserver/v*
- parrot/v*

jobs:
release:
Expand All @@ -13,6 +13,8 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
Expand All @@ -25,9 +27,18 @@ jobs:
mask-password: 'true'
env:
AWS_REGION: ${{ secrets.QA_AWS_REGION }}
- name: Build and release
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Goreleaser Release
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser-pro
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IMAGE_PREFIX: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/parrotserver
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
IMAGE_PREFIX: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/parrot
IMAGE_TAG: ${{ github.ref_name}}
run: goreleaser release --clean -f ./parrotserver/.goreleaser.yml
24 changes: 12 additions & 12 deletions parrot/.goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
version: 1
project_name: parrotserver
version: 2
project_name: parrot

monorepo:
tag_prefix: parrotserver/
dir: parrotserver
tag_prefix: parrot/
dir: parrot

env:
- IMG_PRE={{ if index .Env "IMAGE_PREFIX" }}{{ .Env.IMAGE_PREFIX }}{{ else }}local{{ end }}
- TAG={{ if index .Env "IMAGE_TAG" }}{{ .Env.IMAGE_TAG }}{{ else }}latest{{ end }}

# Build settings for binaries
builds:
- id: parrotserver
- id: parrot
goos:
- linux
- darwin
Expand All @@ -26,25 +26,25 @@ archives:
- format: binary

dockers:
- id: linux-amd64-parrotserver
- id: linux-amd64-parrot
goos: linux
goarch: amd64
image_templates:
- '{{ .Env.IMG_PRE }}/parrotserver:{{ .Tag }}'
- '{{ .Env.IMG_PRE }}/parrotserver:latest'
- '{{ .Env.IMG_PRE }}/parrot:{{ .Tag }}'
- '{{ .Env.IMG_PRE }}/parrot:latest'
build_flag_templates:
- --platform=linux/amd64
- --pull
- --label=org.opencontainers.image.created={{.Date}}
- --label=org.opencontainers.image.title={{.ProjectName}}
- --label=org.opencontainers.image.revision={{.FullCommit}}
- --label=org.opencontainers.image.version={{.Version}}
- id: linux-arm64-parrotserver
- id: linux-arm64-parrot
goos: linux
goarch: arm64
image_templates:
- '{{ .Env.IMG_PRE }}/parrotserver:{{ .Tag }}-arm64'
- '{{ .Env.IMG_PRE }}/parrotserver:latest-arm64'
- '{{ .Env.IMG_PRE }}/parrot:{{ .Tag }}-arm64'
- '{{ .Env.IMG_PRE }}/parrot:latest-arm64'
build_flag_templates:
- --platform=linux/arm64
- --pull
Expand All @@ -55,4 +55,4 @@ dockers:

before:
hooks:
- cd parrotserver && go mod tidy
- cd parrot && go mod tidy

0 comments on commit d4ac2fa

Please sign in to comment.