Skip to content

Commit

Permalink
Update: Workflow for creating auto release
Browse files Browse the repository at this point in the history
Added write permission to Actions bot
Added env variable to access GITHUB_TOKEN
  • Loading branch information
s-bose7 committed Aug 19, 2024
1 parent ca30587 commit 2ae66b9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/release-branch-creation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
description: 'Current version (e.g., 1.0.0)'
required: true

permissions:
contents: write

jobs:
createrelease:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -43,15 +46,18 @@ jobs:
# Include commits since the previous version
commits=$(git log --oneline v${{ github.event.inputs.prevVersion }}..develop)
fi
echo "::set-output name=commits::${commits}"
echo "commits=${commits}" >> $GITHUB_OUTPUT
- name: Push new release branch to origin
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push origin release/v${{ github.event.inputs.currVersion }}
- name: Create pull request to main
uses: thomaseizinger/create-pull-request@1.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
head: release/v${{ github.event.inputs.currVersion }}
base: main
title: v${{ github.event.inputs.currVersion }} into main
Expand All @@ -64,6 +70,7 @@ jobs:
- name: Create pull request to develop
uses: thomaseizinger/create-pull-request@1.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
head: release/v${{ github.event.inputs.currVersion }}
base: develop
title: v${{ github.event.inputs.currVersion }} into develop
Expand Down

0 comments on commit 2ae66b9

Please sign in to comment.