|
20 | 20 | # See https://doc.rust-lang.org/rustc/platform-support/apple-darwin.html#os-version for more details |
21 | 21 | MACOSX_DEPLOYMENT_TARGET: 11.0 |
22 | 22 | # This will become "true" if the latest commit is |
23 | | - # "Version Packages", set from check-is-release.js |
| 23 | + # "Version Packages" or "Version Pacakges (canary)" |
| 24 | + # set from scripts/check-is-release.js |
24 | 25 | __NEW_RELEASE: 'false' |
25 | 26 |
|
26 | 27 | jobs: |
|
49 | 50 | run: | |
50 | 51 | # TODO: Remove the new release check once the new release workflow is fully replaced. |
51 | 52 | RELEASE_CHECK=$(node ./scripts/check-is-release.js 2> /dev/null || :) |
52 | | - if [[ $RELEASE_CHECK =~ ^Version\ Packages$ ]]; |
| 53 | + if [[ $RELEASE_CHECK =~ ^Version\ Packages(\ \(canary\))?$ ]]; |
53 | 54 | then |
54 | 55 | echo "__NEW_RELEASE=true" >> $GITHUB_ENV |
55 | 56 | elif [[ $RELEASE_CHECK = v* ]]; |
@@ -602,18 +603,26 @@ jobs: |
602 | 603 |
|
603 | 604 | # New release process |
604 | 605 | - name: Publish to NPM |
605 | | - id: publish-packages |
| 606 | + id: changesets |
606 | 607 | if: ${{ env.__NEW_RELEASE == 'true' }} |
607 | 608 | uses: changesets/action@v1 |
608 | 609 | with: |
609 | 610 | publish: pnpm ci:publish |
610 | 611 | env: |
611 | 612 | GITHUB_TOKEN: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }} |
612 | 613 | NPM_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }} |
| 614 | + RELEASE_TYPE: ${{ github.event.inputs.releaseType }} |
| 615 | + |
| 616 | + # Add label to verify the PR is created from this workflow. |
| 617 | + - name: Add label to PR |
| 618 | + if: steps.changesets.outputs.pullRequestNumber |
| 619 | + run: 'gh pr edit ${{ steps.changesets.outputs.pullRequestNumber }} --add-label "created-by: CI"' |
| 620 | + env: |
| 621 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
613 | 622 |
|
614 | 623 | - name: Upload npm log artifact |
| 624 | + if: steps.changesets.outputs.published == 'true' |
615 | 625 | uses: actions/upload-artifact@v4 |
616 | | - if: always() |
617 | 626 | with: |
618 | 627 | name: npm-publish-logs |
619 | 628 | path: /home/runner/.npm/_logs/* |
|
0 commit comments