Create Release PR #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Release PR | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
type: string | |
description: The version you intend to release without leading 'v' (eg x.y.z and not vx.y.z) | |
env: | |
VERSION: ${{ github.event.inputs.version }} | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Validate input version does not start with 'v' | |
if: ${{ env.VERSION == '' || startsWith(env.VERSION, 'v') }} | |
run: | | |
echo "version '${{ env.VERSION}}' is invalid, it must not be empty or start with 'v'" | |
exit 1 | |
# - name: Validate input version | |
# run: if [[ '${{ env.VERSION }}' == v* ]];then echo 'version must not start with v';exit 1;fi | |
- name: Checkout repository code | |
uses: actions/checkout@v4 | |
# temporarily skipped | |
# - name: setup-go | |
# uses: actions/setup-go@v4 | |
# with: | |
# go-version: "1.21.x" | |
# - name: Install Buf | |
# run: make installbuf | |
- name: Update Buf Version | |
run: make updateversion | |
- name: Update Changelog Version | |
run: make releasechangelog | |
- uses: ./.github/actions/create-pr-action | |
with: | |
branch: release/v${{ env.VERSION }} | |
commit_message: Update version to v${{ env.VERSION }} | |
title: Release v${{env.VERSION}} | |
body: | | |
Release prepared for ${{ env.VERSION }} | |
Reminder: Verify the changelog | |
token: ${{ secrets.GITHUB_TOKEN }} | |
# placeholder for slack notification |