Skip to content

Commit

Permalink
ci: cut release branch permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
zachstence committed Nov 13, 2024
1 parent 2ae3b36 commit ff895b6
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/cut-release-branch.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: "Cut Release Branch"
permissions:
contents: write
pull-requests: write

on:
workflow_dispatch: # allow manual triggering
Expand All @@ -9,11 +12,14 @@ jobs:
cut-release-branch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4
- name: Compute branch name
id: branch_name
run: echo "branch_name=release-$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
- run: |
- name: Create release branch
run: |
git checkout -b ${{ steps.branch_name.outputs.branch_name }}
git push -u origin ${{ steps.branch_name.outputs.branch_name }}
- run: gh pr --base main --head ${{ steps.branch_name.outputs.branch_name }}}} --title "Release ${{ steps.branch_name.outputs.branch_name }}"
- name: Create pull request
run: gh pr --base main --head ${{ steps.branch_name.outputs.branch_name }}}} --title "Release ${{ steps.branch_name.outputs.branch_name }}"

0 comments on commit ff895b6

Please sign in to comment.