Skip to content

Commit c574bf4

Browse files
authored
chore(ci): force release tag on HEAD when using publish_only input in release (#8466)
1 parent 0dd2c34 commit c574bf4

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,17 @@ jobs:
112112
npm install -g npm
113113
yarn install --immutable
114114
115+
- name: Move release tag to HEAD
116+
if: ${{ github.event.inputs.publish_only == 'true' }}
117+
run: |
118+
tag=$(git describe --abbrev=0)
119+
echo "Moving tag $tag to HEAD"
120+
git tag -f "$tag"
121+
122+
- name: List packages to publish
123+
if: ${{ github.event.inputs.publish_only == 'true' }}
124+
run: ${GITHUB_WORKSPACE}/node_modules/.bin/lerna ls --json
125+
115126
- name: Setup Git User
116127
if: ${{ github.event.inputs.publish_only != 'true' }}
117128
run: |
@@ -143,10 +154,6 @@ jobs:
143154
- name: build mcp-server data
144155
run: yarn build:mcp
145156

146-
- name: List packages to publish
147-
if: ${{ github.event.inputs.publish_only == 'true' }}
148-
run: ${GITHUB_WORKSPACE}/node_modules/.bin/lerna ls --json
149-
150157
- name: publish to npm
151158
run: |
152159
${GITHUB_WORKSPACE}/node_modules/.bin/lerna publish from-git ${{ (github.event.inputs.snapshot == 'true' && '--pre-dist-tag dev') || '' }}

0 commit comments

Comments
 (0)