Skip to content

Commit 8268575

Browse files
authored
[release-new] move "add label to pr" workflow from publish to trigger (#79619)
It _does work_ but it is more natural to put the "add a label to pr" workflow after the "create pr" workflow.
1 parent 05dc840 commit 8268575

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.github/workflows/build_and_deploy.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -614,13 +614,6 @@ jobs:
614614
GITHUB_TOKEN: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
615615
NPM_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }}
616616

617-
# Add label to verify the PR is created from this workflow.
618-
- name: Add label to PR
619-
if: steps.changesets.outputs.pullRequestNumber
620-
run: 'gh pr edit ${{ steps.changesets.outputs.pullRequestNumber }} --add-label "created-by: CI"'
621-
env:
622-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
623-
624617
- name: Send a Slack notification of the publish status
625618
run: pnpm tsx scripts/release/slack.ts
626619
env:

.github/workflows/trigger_release_new.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,17 @@ jobs:
107107
- run: pnpm run build
108108

109109
- name: Create Release Pull Request
110-
id: version-packages
110+
id: changesets
111111
uses: changesets/action@v1
112112
with:
113113
version: pnpm ci:version
114114
env:
115115
GITHUB_TOKEN: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
116116
RELEASE_TYPE: ${{ github.event.inputs.releaseType }}
117+
118+
# Add label to verify the PR is created from this workflow.
119+
- name: Add label to PR
120+
if: steps.changesets.outputs.pullRequestNumber
121+
run: 'gh pr edit ${{ steps.changesets.outputs.pullRequestNumber }} --add-label "created-by: CI"'
122+
env:
123+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)