Skip to content

chore: specify goreleaser config schema version #97

chore: specify goreleaser config schema version

chore: specify goreleaser config schema version #97

Workflow file for this run

name: Release
on:
push:
# Publish `master` as Docker `latest` image.
branches:
- master
# Publish `v1.2.3` tags as releases.
tags:
- v*
jobs:
push:
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.22
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up qemu
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: Extract Helm version
id: extract_helm_version
run: |
HELM_VERSION="$(grep helm\.sh/helm/ go.mod | sed -E -e 's!helm\.sh/helm/v3|\s+|\+.*!!g; s!^v!!' | cut -d ' ' -f2 | grep -E .+)"
echo "helm_version=$HELM_VERSION" >> $GITHUB_OUTPUT
- name: Build & Test
run: make test check image e2e-test
- name: Log into GitHub registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Log into DockerHub registry
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login docker.io -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
version: v2.1.0
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HELM_VERSION: ${{ steps.extract_helm_version.outputs.helm_version }}