Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions .github/workflows/deploy-auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ on:
tags:
- 'v*' # 当推送带有 v 前缀的标签时触发

# Unlike deploy-manual.yml, no job here asks for `fetch-tags`. This workflow is triggered *by* the
# tag, so the tag is the ref being checked out and is already there — `check-release.js` finds it.
# Asking for it on top makes checkout fetch the commit and the tag into the same `refs/tags/*`,
# which git refuses: "Cannot fetch both <sha> and refs/tags/vX to refs/tags/vX". That failure took
# down every tag-triggered release from v0.0.5 onwards.

env:
NODE_VERSION: '23.11.1'
BUILD_MODE: release
Expand All @@ -16,8 +22,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-tags: true

- name: Setup Node.js
uses: actions/setup-node@v4
Expand Down Expand Up @@ -66,8 +70,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-tags: true

- name: Setup Node.js
uses: actions/setup-node@v4
Expand Down Expand Up @@ -103,8 +105,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-tags: true

- name: Setup Node.js
uses: actions/setup-node@v4
Expand All @@ -127,8 +127,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-tags: true

- name: Prepare notification
run: |
Expand Down Expand Up @@ -157,8 +155,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-tags: true

- name: Prepare notification
run: |
Expand Down
9 changes: 9 additions & 0 deletions scripts/cli
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@ cmd_build_json2type () {

cmd_release () {
[[ `git branch --show-current` != "main" ]] || fail 'please do not release from `main` branch'

# `lerna version` starts with `git remote update`, which fetches every remote and recurses into
# their submodules. Branches on the upstream fork reference `rum-events-format` commits its own
# remote does not serve, so that fetch fails and takes the release down before anything is
# tagged. Nothing here reads upstream, so keep it out of the update. Idempotent, and a no-op for
# anyone without that remote.
if git remote get-url upstream > /dev/null 2>&1; then
git config remote.upstream.skipDefaultUpdate true
fi
# We should publish all packages regardless of if there are changes in each.
# --force-publish will skip the `lerna changed` check for changed packages
# https://github.com/lerna/lerna/tree/main/libs/commands/version#--force-publish
Expand Down
Loading