Skip to content

Prepare the release

Prepare the release #3

name: "Prepare the release"
on:
workflow_dispatch:
inputs:
version:
description: version of the operator to release
required: true
jobs:
prepare-release:
runs-on: ubuntu-22.04
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.20"
- uses: actions/checkout@v4
- name: Update makefile
run: sed -i.bak "s/OPERATOR_VERSION ?= .*/OPERATOR_VERSION ?= $OPERATOR_VERSION/g" Makefile && rm Makefile.bak
env:
OPERATOR_VERSION: ${{inputs.version}}
- name: Generate bundle
run: make bundle
env:
OPERATOR_VERSION: ${{inputs.version}}
IMG_PREFIX: ghcr.io/grafana/tempo-operator
- name: Generate CHANGELOG
run: make chlog-update
env:
OPERATOR_VERSION: ${{inputs.version}}
# Commit all changed files back to the repository
- name: Commit the changes to the repository and create PR
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git checkout -b releases/${{ inputs.version }}
git add -A
git commit -m "Prepare Release ${{inputs.version}}" --author="${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
git push -f --set-upstream origin releases/${{ inputs.version }}
gh pr create --title='Prepare release v${{ inputs.version }}' --assignee=${{ github.actor }} --reviewer=${{ github.actor }} --body='v${{ inputs.version }}'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}