Skip to content

Commit

Permalink
fixing permissions and pr stuff !minor
Browse files Browse the repository at this point in the history
  • Loading branch information
coordt committed Dec 18, 2023
1 parent db3d046 commit 8aed959
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jobs:
version:
permissions:
id-token: write
pull-requests: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -34,14 +35,24 @@ jobs:
echo "release-kind=$RELEASE_KIND" >> $GITHUB_OUTPUT
echo "PACKAGE=false" >> $GITHUB_ENV
- name: Get Pull Request Number
id: pr
run: |
PR_NUMBER=$(gh pr view --json number -q .number || echo "")
echo "::set-output name=pull_request_number::${PR_NUMBER}"
echo "::notice::PR_NUMBER is ${PR_NUMBER}"
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.PAT }}

- name: Bump version
if: ${{ env.RELEASE_KIND != 'no-release' }}
shell: bash
run: |
PR_NUMBER=$(gh pr view --json number -q .number || echo "")
echo "::notice::PR_NUMBER is: ${PR_NUMBER}"
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
export PR_NUMBER
# PR_NUMBER=$(gh pr view --json number -q .number || echo "")
# echo "::notice::PR_NUMBER is: ${PR_NUMBER}"
# echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
# export PR_NUMBER
case "$RELEASE_KIND" in
major|minor|patch)
bump-my-version bump --allow-dirty --verbose "$RELEASE_KIND"
Expand Down

0 comments on commit 8aed959

Please sign in to comment.