Make Release Branch #12
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: 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 }} |