Skip to content

Commit

Permalink
fix: Move PR labelling into extra job
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzolino committed Feb 21, 2023
1 parent 0e428d9 commit 45a30e6
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,21 @@ jobs:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
# GitHub sets this automatically
GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
- name: Add published label to pull request
run: |
export PR_NUMBER=$(gh pr list --state merged --label 'autorelease: tagged' --json number --jq '.[0].number')
gh pr edit $PR_NUMBER --remove-label 'autorelease: tagged'
gh pr edit $PR_NUMBER --add-label 'autorelease: published'
env:
label:
if: ${{ needs.release-please.outputs.release_created }}
name: Label PR
needs: goreleaser
runs-on: ubuntu-latest

env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }}

steps:
- name: Get PR number
id: pr
run: |
echo "pr_number=$(gh pr list --state merged --label 'autorelease: tagged' --json number --jq '.[0].number')" >> $GITHUB_OUTPUT
- run: "gh pr edit ${{ steps.pr.outputs.pr_number }} --remove-label 'autorelease: tagged'"
- run: "gh pr edit ${{ steps.pr.outputs.pr_number }} --add-label 'autorelease: published'"


0 comments on commit 45a30e6

Please sign in to comment.