chore(release): v0.20.0 #372
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: notify-release-feishu | |
| # On every push to a release/** branch, build a full prerelease package by reusing | |
| # release-prerelease, then post a Feishu card with the download | |
| # links (macOS arm64 + Intel, Windows, and Linux when enabled) and the changelog | |
| # since the previously published prerelease. Consecutive pushes to the same branch | |
| # are throttled, not debounced: an in-flight build is allowed to finish (so a | |
| # busy release branch always produces a prerelease), while pushes that arrive | |
| # during it coalesce into a single trailing build of the latest commit. With | |
| # cancel-in-progress the previous behavior starved β pushes spaced closer than | |
| # the build duration kept cancelling each other and no package was ever cut. | |
| # | |
| # Also dispatchable by hand (workflow_dispatch) so a prerelease + Feishu card can be | |
| # cut without an actual push. The normal manual path is to dispatch ON a | |
| # release/vX.Y.Z branch with `ref`/`release_version` empty β release-prerelease then | |
| # derives the version from the branch name exactly like the push trigger does. | |
| # Building from a non-release ref such as main is also possible but requires | |
| # `release_version` (e.g. 0.10.0, matching apps/packaged/package.json), because | |
| # the branch name carries no version; the resulting package is labelled | |
| # X.Y.Z-prerelease.N on that same version line. Either way the build's actual commit | |
| # (not the dispatch ref) anchors the changelog and the card. | |
| on: | |
| push: | |
| branches: | |
| - "release/**" | |
| workflow_dispatch: | |
| inputs: | |
| ref: | |
| description: "Git ref (branch/tag/SHA) to build a prerelease from. Empty builds the ref this workflow is dispatched on. Dispatch on release/vX.Y.Z and leave empty for the normal path." | |
| required: false | |
| type: string | |
| default: "" | |
| release_version: | |
| description: "Base version (x.y.z) β ONLY needed to build from a non-release ref such as main, where the branch name carries no version. Must equal apps/packaged/package.json. Leave empty on a release/vX.Y.Z branch." | |
| required: false | |
| type: string | |
| default: "" | |
| amr_profile: | |
| description: "Optional AMR profile to bake (test / feature-test enable the Workspace Team transport). Empty uses the per-branch default: test on release/v0.18.0, otherwise prod." | |
| required: false | |
| type: string | |
| default: "" | |
| win_x64_smoke_mode: | |
| description: "Windows x64 packaged smoke coverage (skip/core/full). Empty uses core. Smoke failures are reported on the download card but do not block publication." | |
| required: false | |
| type: string | |
| default: "" | |
| permissions: | |
| contents: write | |
| actions: write | |
| concurrency: | |
| group: feishu-release-${{ github.ref }} | |
| # Throttle, not debounce: let the running build finish and coalesce the | |
| # queued pushes into one trailing build. GitHub keeps the in-progress run and | |
| # only the newest pending run in the group (older pending runs are cancelled), | |
| # so a busy release branch still cuts a prerelease and converges on the latest | |
| # commit, at most one build running plus one queued. | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| name: Build prerelease from release branch | |
| if: github.repository == 'nexu-io/open-design' | |
| uses: ./.github/workflows/release-prerelease.yml | |
| secrets: inherit | |
| with: | |
| # Empty on push events (inputs context is unset there), so release-prerelease | |
| # falls back to building the pushed commit. On workflow_dispatch this | |
| # carries the operator-chosen ref (or empty = the dispatch ref). | |
| ref: ${{ inputs.ref }} | |
| # Empty on push and on release/vX.Y.Z dispatches (branch name carries the | |
| # version). Only set when building from a non-release ref like main, where | |
| # release-prerelease cannot derive the base version from the branch name. | |
| release_version: ${{ inputs.release_version }} | |
| # Workspace Team profile baked into the packaged build (see | |
| # apps/packaged/src/workspace-team.ts + release-prerelease.yml). Release | |
| # builds ship `prod`: production's Vela backend now serves the feature, so | |
| # a release prerelease points users at the production console rather than | |
| # an internal test environment. A manual dispatch can still override to | |
| # test / feature-test to cut a build against those backends. | |
| # | |
| # (This replaces a temporary `test` default on release/v0.18.0 that | |
| # existed only while prod's resource-hub storage was unconfigured.) | |
| amr_profile: ${{ inputs.amr_profile || 'prod' }} | |
| # Windows packaged smoke is advisory to publication: a failed smoke is | |
| # recorded in the report and annotated on the full download card without | |
| # blocking platform or metadata publication. The final arm must name a | |
| # real profile, NOT ''. A workflow_call | |
| # `default:` applies only when an input is omitted, so forwarding an empty | |
| # string defeats the callee's declared `core` default; the empty value | |
| # then reaches the spec, reads as "not core", and selects the updater path | |
| # β which demands a fixture only a genuine `full` request wires up, so the | |
| # job dies before the smoke starts. That is how release/v0.18.1's first | |
| # prerelease failed on its branch-cut commit. | |
| win_x64_smoke_mode: ${{ inputs.win_x64_smoke_mode || 'core' }} | |
| notify: | |
| name: Notify Feishu (release) | |
| needs: build | |
| if: ${{ !cancelled() && needs.build.outputs.release_version != '' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout built ref | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| # The commit release-prerelease actually built, not github.sha. On push | |
| # the two coincide, but on workflow_dispatch with an explicit ref they | |
| # can differ β anchoring on the built commit keeps the changelog range | |
| # (previous_commit..commit) correct for manual prerelease runs. | |
| ref: ${{ needs.build.outputs.commit }} | |
| fetch-depth: 0 | |
| - name: Compute changelog since last prerelease | |
| id: changelog | |
| env: | |
| PREV: ${{ needs.build.outputs.previous_commit }} | |
| CUR: ${{ needs.build.outputs.commit }} | |
| run: | | |
| set -euo pipefail | |
| file="$RUNNER_TEMP/changelog.txt" | |
| : > "$file" | |
| if [ -n "$PREV" ] && git cat-file -e "${PREV}^{commit}" 2>/dev/null && git cat-file -e "${CUR}^{commit}" 2>/dev/null; then | |
| git log --no-merges --pretty=format:'%s (%h)' "${PREV}..${CUR}" > "$file" || true | |
| fi | |
| echo "file=$file" >> "$GITHUB_OUTPUT" | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v5 | |
| with: | |
| version: 10.33.2 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| - name: Post Feishu card | |
| env: | |
| FEISHU_WEBHOOK: ${{ secrets.FEISHU_RELEASE_WEBHOOK }} | |
| FEISHU_SIGN_SECRET: ${{ secrets.FEISHU_RELEASE_SIGN_SECRET }} | |
| CHANNEL_LABEL: "Prerelease" | |
| VERSION: ${{ needs.build.outputs.release_version }} | |
| BRANCH: ${{ needs.build.outputs.branch }} | |
| COMMIT: ${{ needs.build.outputs.commit }} | |
| PREVIOUS_COMMIT: ${{ needs.build.outputs.previous_commit }} | |
| CHANGELOG_FILE: ${{ steps.changelog.outputs.file }} | |
| BUILD_STATE: ${{ needs.build.result }} | |
| MAC_ARM64_SMOKE_RESULT: ${{ needs.build.outputs.mac_arm64_smoke_result }} | |
| WIN_X64_SMOKE_RESULT: ${{ needs.build.outputs.win_x64_smoke_result }} | |
| MAC_ARM64_URL: ${{ needs.build.outputs.mac_arm64_url }} | |
| MAC_INTEL_URL: ${{ needs.build.outputs.mac_intel_url }} | |
| WIN_URL: ${{ needs.build.outputs.win_url }} | |
| LINUX_URL: ${{ needs.build.outputs.linux_url }} | |
| STREAM_LABEL: "release εζ―ζ¨ι" | |
| REPO: ${{ github.repository }} | |
| RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
| run: node --experimental-strip-types tools/release/src/notifications/feishu.ts |