Skip to content

Release

Release #124

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"
LEGACY_BINARIES: "centos-amd64,darwin-amd64,darwin-arm64,debian-amd64,darwin-amd64,rhel-amd64,ubuntu-amd64,ubuntu-arm64"
BINARIES: "darwin-amd64,darwin-arm64,linux-amd64,linux-arm64"
DOCKER_REPO: "kumahq"
PULP_URL: "https://download.konghq.com/kuma-binaries-release/"
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@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
ref: "master"
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
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@7bfa3a4717ef143a604ee0a99d859b8886a96d00 # v1.9.3
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-pulp-legacy
env:
GITHUB_TOKEN: ${{ github.token }}
if: fromJSON(env.CHECK) && (startsWith(env.RELEASE, '2.1') || startsWith(env.RELEASE, '2.0') || startsWith(env.RELEASE, '1.'))
run: |
release-tool release pulp-binaries --repo ${{ github.repository }} --release ${{ env.RELEASE }} --binaries ${{ env.LEGACY_BINARIES }}
- name: check-pulp
env:
GITHUB_TOKEN: ${{ github.token }}
if: fromJSON(env.CHECK) && !(startsWith(env.RELEASE, '2.1') || startsWith(env.RELEASE, '2.0') || startsWith(env.RELEASE, '1.'))
run: |
release-tool release pulp-binaries --repo ${{ github.repository }} --release ${{ env.RELEASE }} --binaries ${{ env.BINARIES }} --base-url ${{ env.PULP_URL }}
- 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@c55203cfde3e5c11a452d352b4393e68b85b4533 # v6.0.3
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>