Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix release workflow #643

Merged
merged 14 commits into from
Mar 21, 2023
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
tags:
- "*"

permissions: write-all

jobs:
build_frontend:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -75,3 +77,28 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SEGMENT_WRITE_KEY: ${{ secrets.SEGMENT_WRITE_KEY }}
PURPLIN_BOT: ${{ secrets.PURPLIN_BOT }}

- uses: actions/checkout@v3
with:
repository: tailwarden/helm
ref: master
path: helm
token: ${{ secrets.PURPLIN_BOT }}
persist-credentials: true

- name: "Create new values.yaml"
run: |
export VERSION=$(echo $TAG | cut -c2-)
cat templates/values.template.yaml | envsubst > helm/values.yaml
env:
TAG: ${{ github.ref_name }}

- name: "Push changes to tailwarden/helm"
run: |
cd ./helm
git add .
git config user.name "purplin"
git config user.email "[email protected]"
git commit -m "Bump version to 3.0.7"
eneskaya marked this conversation as resolved.
Show resolved Hide resolved
git push
44 changes: 38 additions & 6 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,63 @@ builds:
goarch:
- amd64
- arm64
ignore:
- goos: windows
goarch: arm64
- goos: linux
eneskaya marked this conversation as resolved.
Show resolved Hide resolved
goarch: arm64

blobs:
- provider: s3
bucket: komiser-releases
folder: "/{{.Version}}"
region: eu-central-1

brews:
- tap:
owner: tailwarden
name: homebrew-komiser
branch: master
token: "{{ .Env.PURPLIN_BOT }}"
commit_author:
name: purplin
email: [email protected]
folder: Formula
homepage: "https://komiser.io"
description: "Komiser.io command line interface"
url_template: "https://cli.komiser.io/{{ .Tag }}/{{ .ArtifactName }}"
url_template: "https://cli.komiser.io/{{ .Version }}/{{ .ArtifactName }}"

dockers:
- image_templates:
- tailwarden/komiser:{{ .Tag }}
- tailwarden/komiser:latest
- tailwarden/komiser:{{ .FullCommit }}
- tailwarden/komiser:{{ .Version }}-amd64
- tailwarden/komiser:{{ .FullCommit }}-amd64
dockerfile: Dockerfile
use: buildx
build_flag_templates:
- "--platform linux/amd64,linux/arm64"
- "--build-arg SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY"
- --platform=linux/amd64
- --build-arg=SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY
eneskaya marked this conversation as resolved.
Show resolved Hide resolved
- image_templates:
- tailwarden/komiser:{{ .Version }}-arm64
- tailwarden/komiser:{{ .FullCommit }}-arm64
dockerfile: Dockerfile
use: buildx
build_flag_templates:
- --platform=linux/arm64
- --build-arg=SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY

docker_manifests:
- name_template: tailwarden/komiser:{{ .FullCommit }}
image_templates:
- tailwarden/komiser:{{ .FullCommit }}-amd64
- tailwarden/komiser:{{ .FullCommit }}-arm64
- name_template: tailwarden/komiser:{{ .Version }}
image_templates:
- tailwarden/komiser:{{ .Version }}-amd64
- tailwarden/komiser:{{ .Version }}-arm64
- name_template: tailwarden/komiser:latest
image_templates:
- tailwarden/komiser:{{ .Version }}-amd64
- tailwarden/komiser:{{ .Version }}-arm64

release:
github:
Expand Down
7 changes: 7 additions & 0 deletions templates/values.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
image:
repository: tailwarden/komiser
tag: ${VERSION}
pullPolicy: IfNotPresent

aws:
region: "eu-central-1"