Skip to content

Merge pull request #5073 from k8s-infra-cherrypick-robot/cherry-pick-… #5

Merge pull request #5073 from k8s-infra-cherrypick-robot/cherry-pick-…

Merge pull request #5073 from k8s-infra-cherrypick-robot/cherry-pick-… #5

Workflow file for this run

name: release
on:
push:
tags:
- 'v*'
permissions:
contents: write # required to write to github release.
jobs:
release:
name: Create draft release
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Set version info
run: |
echo "VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV
echo "PREVIOUS_VERSION=$(git describe --abbrev=0 2> /dev/null)" >> $GITHUB_ENV
echo "RELEASE_BRANCH=release-$(echo ${GITHUB_REF_NAME} | grep -Eo '[0-9]\.[0-9]+')" >> $GITHUB_ENV
echo "RELEASE_TAG=${GITHUB_REF_NAME}" >> $GITHUB_ENV
- name: Run release
run: |
echo "Version is: $VERSION"
echo "Previous version is: $PREVIOUS_VERSION"
echo "Release branch is: $RELEASE_BRANCH"
echo "Release tag is: $RELEASE_TAG"
make release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}