Skip to content

chart releaser 1.6.0 #45

chart releaser 1.6.0

chart releaser 1.6.0 #45

Workflow file for this run

name: Release
on:
push:
branches:
- master
paths:
- charts/tibber-exporter/Chart.yaml
jobs:
release-docker:
name: Release docker
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get release version
id: get_version
run: "sed -n 's/^version: /version=/p' charts/tibber-exporter/Chart.yaml >> $GITHUB_OUTPUT"
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
provenance: false
push: true
tags: ghcr.io/${{ github.repository_owner }}/tibber-exporter:${{ steps.get_version.outputs.version }},ghcr.io/${{ github.repository_owner }}/tibber-exporter:latest
release-chart:
name: Release chart
needs: release-docker
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Install Helm
uses: azure/setup-helm@v3
with:
token: "${{ secrets.GITHUB_TOKEN }}"
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.6.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
release-binaries:
name: Release binaries
needs: release-chart
permissions:
contents: write
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: [amd64, arm, arm64]
exclude:
- goarch: arm
goos: windows
- goarch: arm64
goos: windows
- goarch: arm
goos: darwin
steps:
- uses: actions/checkout@v4
- name: Get version
id: get_version
run: "sed -n 's/^version: /version=/p' charts/tibber-exporter/Chart.yaml >> $GITHUB_OUTPUT"
- name: Get go version
id: get_go_version
run: sed -n -E '/^FROM/ {s/^FROM golang:([0-9.]+).*/go_version=\1/p;q}' Dockerfile >> $GITHUB_OUTPUT
- uses: wangyoucao577/go-release-action@v1.41
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goversion: ${{ steps.get_go_version.outputs.go_version }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
asset_name: "tibber-exporter-${{ steps.get_version.outputs.version }}-${{ matrix.goos }}-${{ matrix.goarch }}"
release_tag: "tibber-exporter-${{ steps.get_version.outputs.version }}"
build_command: make
md5sum: false