diff --git a/.github/workflows/prep-internal-release.yml b/.github/workflows/prep-internal-release.yml index d7bbaae..9046aca 100644 --- a/.github/workflows/prep-internal-release.yml +++ b/.github/workflows/prep-internal-release.yml @@ -2,10 +2,14 @@ on: workflow_dispatch: inputs: + prev_branch_name: + description: 'Prev branch name, must start with v' + required: true + default: 'v0.1.0-rc.1' release_branch_name: description: 'Release branch name, must start with v' required: true - default: 'v0.1.0-rc.1' + default: 'v0.1.0-rc.2' jobs: @@ -86,12 +90,21 @@ jobs: echo Review and approve PR before release can continue exit 1 // force actions stop here - - name: Create the release branch - uses: peterjgrainger/action-create-branch@v2.4.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - branch: "${{ github.event.inputs.release_branch_name }}" + - name: Create release branch starting point + run: | + git push origin refs/heads/${{ github.event.inputs.prev_branch_name }}:${{ github.event.inputs.release_branch_name }} + + - name: Create PR to release branch + run: | + CURRENT_BRANCH=${GITHUB_REF_NAME} + gh pr create -B ${{ github.event.inputs.release_branch_name }} --title "New release ${{ github.event.inputs.release_branch_name }}" --body 'Created by Github action' + + # - name: Create PR to release branch + # uses: peterjgrainger/action-create-branch@v2.4.0 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # branch: "${{ github.event.inputs.release_branch_name }}" # - name: Tag the release branch # if: env.NEXT_DEV_VERSION != ''