Create Release PR #10
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 | |
# - run: git config --global user.name "${{ github.actor }}" | |
# - run: git config --global user.email "${{ github.actor }}@users.noreply.github.com" | |
# - name: Create Release PR | |
# run: | | |
# PR_BRANCH=release/v${{ env.VERSION }} | |
# git checkout -b "${PR_BRANCH}" | |
# git add . | |
# git commit -m "Update version to v${{ env.VERSION }}" | |
# git push origin "${PR_BRANCH}" --force | |
# gh pr create --title "Release v${{env.VERSION}}" --body "Release prepared for ${{ env.VERSION }} | |
# Reminder: Verify the changelog" | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- 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 }} | |
# placeholder for slack notification |