Skip to content

Release

Release #228

Workflow file for this run

name: "release"
run-name: Release${{ inputs.check && ' and check' || '' }} ${{ inputs.release }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
on:
release: {}
schedule:
- cron: 0 7 * * *
workflow_dispatch:
inputs:
release:
description: "the version to publish, if you just want to regen the changelog.md set 0.0.0"
required: true
type: string
check:
required: false
type: boolean
default: false
description: "check that everything is published correctly"
env:
CHARTS_REPO: "kumahq/charts"
BINARIES: "darwin-amd64,darwin-arm64,linux-amd64,linux-arm64"
DOCKER_REPO: "kumahq"
DOCKER_IMAGES: "kumactl,kuma-cp,kuma-dp,kuma-init,kuma-cni"
RELEASE: ${{ inputs.release || '0.0.0' }}
CHECK: ${{ inputs.check || 'false' }}
EDITION: kuma
MIN_VERSION: "1.2.0"
USE_LABEL_IN_VERSION: "false"
permissions:
contents: read
jobs:
release:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
ref: "master"
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod
- name: install-kuma-ci-tools
run: |
echo $(go env GOPATH)/bin >> $GITHUB_PATH
go install github.com/kumahq/ci-tools/cmd/[email protected]
- name: Generate GitHub app token
id: github-app-token
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: create-release
if: env.RELEASE != '0.0.0'
env:
GITHUB_TOKEN: ${{ steps.github-app-token.outputs.token }}
run: |
release-tool release changelog --repo ${{ github.repository }} --release ${{ env.RELEASE }}
- name: check-helm
if: env.RELEASE != '0.0.0' && fromJSON(env.CHECK)
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
release-tool release helm-chart --repo ${{ github.repository }} --charts-repo ${{ env.CHARTS_REPO }} --release ${{ env.RELEASE }}
- name: check-binaries
env:
GITHUB_TOKEN: ${{ github.token }}
if: fromJSON(env.CHECK)
run: |
release-tool release binaries --repo ${{ github.repository }} --release ${{ env.RELEASE }} --binaries ${{ env.BINARIES }}
- name: check-docker
env:
GITHUB_TOKEN: ${{ github.token }}
if: fromJSON(env.CHECK)
run: |
release-tool release docker --repo ${{ github.repository }} --release ${{ env.RELEASE }} --docker-repo ${{env.DOCKER_REPO }} --images ${{ env.DOCKER_IMAGES }}
- name: update-active-branches.json
env:
GITHUB_TOKEN: ${{ steps.github-app-token.outputs.token }}
run: |
release-tool version-file --repo ${{ github.repository }} --active-branches > active-branches.json
- name: update-versions.yml
env:
GITHUB_TOKEN: ${{ steps.github-app-token.outputs.token }}
run: |
release-tool version-file --repo ${{ github.repository }} --edition ${{ env.EDITION }} --min-version ${{ env.MIN_VERSION }} --use-label-for-dev=${{ env.USE_LABEL_IN_VERSION }} > versions.yml
- name: update-CHANGELOG.md
env:
GITHUB_TOKEN: ${{ steps.github-app-token.outputs.token }}
run: |
release-tool changelog.md --repo ${{ github.repository }} > CHANGELOG.md
- name: "Create Pull Request"
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
with:
commit-message: "docs(CHANGELOG.md): updating changelog and version files"
signoff: true
branch: chore/update-changelog
base: master
delete-branch: true
title: "docs(CHANGELOG.md): updating changelog and version files"
draft: false
labels: ci/skip-test,ci/auto-merge
token: ${{ steps.github-app-token.outputs.token }}
committer: kumahq[bot] <110050114+kumahq[bot]@users.noreply.github.com>
author: kumahq[bot] <110050114+kumahq[bot]@users.noreply.github.com>