We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e258afa commit e80a117Copy full SHA for e80a117
1 file changed
.github/workflows/publish.yml
@@ -20,6 +20,22 @@ jobs:
20
steps:
21
- name: Checkout
22
uses: actions/checkout@v4
23
+ with:
24
+ fetch-depth: 0
25
+ fetch-tags: true
26
+
27
+ # On manual dispatch, jump to the latest `codetime@*` tag so we always
28
+ # publish the most recent release rather than whatever is on the branch.
29
+ - name: Checkout latest tag (manual dispatch)
30
+ if: github.event_name == 'workflow_dispatch'
31
+ run: |
32
+ latest_tag=$(git tag --list 'codetime@*' --sort=-v:refname | head -n 1)
33
+ if [ -z "$latest_tag" ]; then
34
+ echo "no codetime@* tag found" >&2
35
+ exit 1
36
+ fi
37
+ echo "checking out $latest_tag"
38
+ git checkout "refs/tags/$latest_tag"
39
40
- name: Setup pnpm
41
uses: pnpm/action-setup@v4
0 commit comments