Skip to content

Make Release Branch #12

Make Release Branch

Make Release Branch #12

name: Make Release Branch
on:
workflow_dispatch:
inputs:
release_tag:
description: 'New Release Name'
required: true
permissions:
id-token: write
contents: write
pull-requests: write
jobs:
MakeNewReleaseBranch:
runs-on: ubuntu-latest
steps:
- name: Checkout Develop Branch
uses: actions/checkout@v4
with:
ref: develop
- name: Create Release Branch and Update Version
run: |
git config --global user.email "[email protected]"
git config --global user.name "github_actions_lisa"
RELEASE_TAG=${{ github.event.inputs.release_tag }}
git checkout -b release/${{ github.event.inputs.release_tag }}
echo "$( jq --arg version ${RELEASE_TAG:1} '.version = $version' lib/user-interface/react/package.json )" > lib/user-interface/react/package.json
echo "$( jq --arg version ${RELEASE_TAG:1} '.version = $version' package.json )" > package.json
sed -E -i -e "s/version = \"[0-9\.].+\"/version = \"${RELEASE_TAG:1}\"/g" lisa-sdk/pyproject.toml
echo ${RELEASE_TAG:1} > VERSION
git commit -a -m "Updating version for release ${{ github.event.inputs.release_tag }}"
git push origin release/${{ github.event.inputs.release_tag }}
env:
GITHUB_TOKEN: ${{ secrets.LEAD_ACCESS_TOKEN }}
- name: Draft Pull Request
run: |
gh pr create -d --title "Release ${{github.event.inputs.release_tag}} into Main" --body "Release ${{github.event.inputs.release_tag}} PR into Main" --base main --head release/${{ github.event.inputs.release_tag }}
env:
GH_TOKEN: ${{ github.token }}