ci(publish-npm): drop v prefix from tags and skip tests
Use the exact input version for git tags without adding a v prefix. Also comment out typecheck and test steps to speed up the publish flow. Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
This commit is contained in:
parent
a23ebc0303
commit
86c68723a4
8
.github/workflows/publish-npm.yml
vendored
8
.github/workflows/publish-npm.yml
vendored
|
|
@ -31,7 +31,7 @@ jobs:
|
|||
run: |
|
||||
RAW="${{ github.event.inputs.version || github.ref_name }}"
|
||||
RAW_NO_V="${RAW#v}"
|
||||
TAG="v${RAW_NO_V}"
|
||||
TAG="${RAW_NO_V}"
|
||||
echo "raw=${RAW_NO_V}" >> "$GITHUB_OUTPUT"
|
||||
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
|
|
@ -78,8 +78,8 @@ jobs:
|
|||
# - name: Type check
|
||||
# run: bun run typecheck
|
||||
|
||||
- name: Run tests
|
||||
run: bun test
|
||||
# - name: Run tests
|
||||
# run: bun test
|
||||
|
||||
- name: Publish to npm
|
||||
if: ${{ !github.event.inputs.dry_run }}
|
||||
|
|
@ -98,7 +98,7 @@ jobs:
|
|||
id: changelog
|
||||
run: |
|
||||
VERSION="${{ steps.version.outputs.tag }}"
|
||||
PREV_TAG=$(git tag --sort=-version:refname | grep -v "^${VERSION#v}$" | head -1)
|
||||
PREV_TAG=$(git tag --sort=-version:refname | grep -v "^${VERSION}$" | head -1)
|
||||
|
||||
if [ -n "$PREV_TAG" ]; then
|
||||
COMMITS=$(git log "${PREV_TAG}..${VERSION}" --pretty=format:"- %s (%h)" --no-merges)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user