Skip to content

Commit 674ccf5

Browse files
committed
chore(release): switch release tags to v prefix
1 parent 0cff0d4 commit 674ccf5

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Publish to npm
33
on:
44
push:
55
tags:
6-
- 'codetime@*'
6+
- 'v*'
77
workflow_dispatch:
88
inputs:
99
dist_tag:
@@ -24,14 +24,14 @@ jobs:
2424
fetch-depth: 0
2525
fetch-tags: true
2626

27-
# On manual dispatch, jump to the latest `codetime@*` tag so we always
27+
# On manual dispatch, jump to the latest `v*` tag so we always
2828
# publish the most recent release rather than whatever is on the branch.
2929
- name: Checkout latest tag (manual dispatch)
3030
if: github.event_name == 'workflow_dispatch'
3131
run: |
32-
latest_tag=$(git tag --list 'codetime@*' --sort=-v:refname | head -n 1)
32+
latest_tag=$(git tag --list 'v*' --sort=-v:refname | head -n 1)
3333
if [ -z "$latest_tag" ]; then
34-
echo "no codetime@* tag found" >&2
34+
echo "no v* tag found" >&2
3535
exit 1
3636
fi
3737
echo "checking out $latest_tag"

scripts/release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ fi
6060

6161
# ── precondition: tag must not already exist on the remote ──
6262
VERSION="$(node -p "require('$CLI_DIR/package.json').version")"
63-
TAG="codetime@${VERSION}"
63+
TAG="v${VERSION}"
6464
log "release version: $VERSION (dist-tag: $DIST_TAG)"
6565

6666
if git rev-parse -q --verify "refs/tags/$TAG" >/dev/null; then
@@ -95,7 +95,7 @@ fi
9595

9696
# ── tag + push ──
9797
log "tagging $TAG"
98-
git tag -a "$TAG" -m "codetime@${VERSION}"
98+
git tag -a "$TAG" -m "v${VERSION}"
9999
git push origin main --follow-tags
100100

101101
log "done. published codetime@${VERSION}"

0 commit comments

Comments
 (0)