Skip to content

Prepare the release

Prepare the release #1

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@v4
with:
go-version: "1.20"
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.PUBLISH_APP_ID }}
private_key: ${{ secrets.PUBLISH_APP_PRIVATE_KEY }}
installation_retrieval_payload: ${{ secrets.PUBLISH_APP_INSTALLATION_ID }}
installation_retrieval_mode: id
- uses: actions/checkout@v4
with:
token: ${{ steps.generate_token.outputs.token }}
- 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 release/v${{ 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 release/v${{ 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 }}