Skip to content

New Release Process (Semi automatic way) #7

New Release Process (Semi automatic way)

New Release Process (Semi automatic way) #7

Workflow file for this run

name: "Release"
on:
pull_request:
branches:
- main
types:
- closed
jobs:
release:
if: |
github.event.pull_request.merged == true && github.event.pull_request.head.repo.full_name == github.repository
&& github.event.pull_request.user.login == 'github-actions[bot]' && github.event.pull_request.user.type == 'Bot'
&& startsWith(github.event.pull_request.head.ref, 'releases/')
runs-on: ubuntu-22.04
steps:
- name: Determine operator version to release
id: operator-version
run: echo "version=${BRANCH#"releases/"}" >> "$GITHUB_OUTPUT"
env:
BRANCH: ${{ github.event.pull_request.head.ref }}
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.20"
- uses: actions/checkout@v4
with:
ref: main
- name: "generate release resources"
run: make release-artifacts
env:
IMG_PREFIX: ghcr.io/${{ github.repository }}
- name: "create the release in GitHub"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPERATOR_VERSION: ${{ steps.operator-version.outputs.version }}
run: |
awk '/^## / {v=$2} v == "'${OPERATOR_VERSION}'" && !/^## / {print}' CHANGELOG.md > RELEASE_NOTES.md
gh release create \
-t "Release v${OPERATOR_VERSION}" \
-F RELEASE_NOTES.md \
"v${OPERATOR_VERSION}" \
'dist/tempo-operator.yaml#Installation manifest for Kubernetes' \