|
19 | 19 | # |
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 | | - # This will become "true" if the latest commit is |
23 | | - # "Version Packages" or "Version Pacakges (canary)" |
| 22 | + # This will become "true" if the latest commit (merged release PR) is either: |
| 23 | + # - "Version Packages (#<number>)" |
| 24 | + # - "Version Pacakges (canary/rc) (#<number>)" |
24 | 25 | # set from scripts/check-is-release.js |
25 | 26 | __NEW_RELEASE: 'false' |
26 | 27 |
|
@@ -50,10 +51,11 @@ jobs: |
50 | 51 | run: | |
51 | 52 | # TODO: Remove the new release check once the new release workflow is fully replaced. |
52 | 53 | RELEASE_CHECK=$(node ./scripts/check-is-release.js 2> /dev/null || :) |
53 | | - if [[ $RELEASE_CHECK =~ ^Version\ Packages(\ \(canary\))?$ ]]; |
| 54 | + if [[ $RELEASE_CHECK == 'new-release' ]]; |
54 | 55 | then |
55 | 56 | echo "__NEW_RELEASE=true" >> $GITHUB_ENV |
56 | | - elif [[ $RELEASE_CHECK = v* ]]; |
| 57 | + echo "value=production" >> $GITHUB_OUTPUT |
| 58 | + elif [[ $RELEASE_CHECK == v* ]]; |
57 | 59 | then |
58 | 60 | echo "value=production" >> $GITHUB_OUTPUT |
59 | 61 | elif [ '${{ github.ref }}' == 'refs/heads/canary' ] |
@@ -530,7 +532,7 @@ jobs: |
530 | 532 | path: crates/wasm |
531 | 533 |
|
532 | 534 | - name: Create tarballs |
533 | | - run: GH_PR_NUMBER=${{ github.event.pull_request && github.event.pull_request.number || '' }} node scripts/create-preview-tarballs.js "${{ github.sha }}" "${{ runner.temp }}/preview-tarballs" |
| 535 | + run: node scripts/create-preview-tarballs.js "${{ github.sha }}" "${{ runner.temp }}/preview-tarballs" |
534 | 536 |
|
535 | 537 | - name: Upload tarballs |
536 | 538 | uses: actions/upload-artifact@v4 |
@@ -611,14 +613,14 @@ jobs: |
611 | 613 | env: |
612 | 614 | GITHUB_TOKEN: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }} |
613 | 615 | NPM_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }} |
614 | | - RELEASE_TYPE: ${{ github.event.inputs.releaseType }} |
615 | 616 |
|
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"' |
| 617 | + - name: Send a Slack notification of the publish status |
| 618 | + run: pnpm tsx scripts/release/slack.ts |
620 | 619 | env: |
621 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 620 | + SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} |
| 621 | + RELEASE_STATUS: ${{ steps.changesets.outputs.published }} |
| 622 | + WORKFLOW_LINK: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
| 623 | + WORKFLOW_ACTOR: ${{ github.actor }} |
622 | 624 |
|
623 | 625 | - name: Upload npm log artifact |
624 | 626 | if: steps.changesets.outputs.published == 'true' |
@@ -686,6 +688,15 @@ jobs: |
686 | 688 | VERCEL_API_TOKEN: ${{ secrets.VERCEL_API_TOKEN }} |
687 | 689 | DEPLOY_ENVIRONMENT: production |
688 | 690 |
|
| 691 | + buildPassed: |
| 692 | + needs: ['deploy-target', 'build', 'build-wasm', 'build-native'] |
| 693 | + if: always() |
| 694 | + name: thank you, build |
| 695 | + runs-on: ubuntu-latest |
| 696 | + steps: |
| 697 | + - run: exit 1 |
| 698 | + if: ${{ always() && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) }} |
| 699 | + |
689 | 700 | releaseStats: |
690 | 701 | name: Release Stats |
691 | 702 | runs-on: |
|
0 commit comments