Skip to content

Commit

Permalink
fix: Attempt to workaround actions/checkout#1467
Browse files Browse the repository at this point in the history
Currently, the checkout GitHub Action failed to check out when both
`fetch-depth` and `fetch-tags` are specified during a tag push
event(actions/checkout#1467).  This patch workarounds the issue by
manually do the tag fetch afterwards.

Refer-to: Can't fetch with `fetch-tags` when triggered by tag · Issue #1467 · actions/checkout <actions/checkout#1467>
Refer-to: Switch back to an improved manual tag fetching method · wxFormBuilder/wxFormBuilder@459563b <wxFormBuilder/wxFormBuilder@459563be8>
Signed-off-by: 林博仁(Buo-ren, Lin) <[email protected]>
  • Loading branch information
brlin-tw committed Nov 26, 2023
1 parent ef181b5 commit 8748115
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,17 @@ jobs:
fetch-depth: 100

# Fetch tags as well to generate detailed changes between two releases
fetch-tags: true
# WORKAROUND: Adding this option triggers actions/checkout#1467
#fetch-tags: true

- name: >-
WORKAROUND: Fetch tags that points to the revisions
checked-out(actions/checkout#1467)
run: |-
git fetch \
--prune \
--depth=1 \
--no-recurse-submodules
- name: Determine the project identifier
run: printf "project_id=${GITHUB_REPOSITORY##*/}\\n" >> $GITHUB_ENV
Expand Down

0 comments on commit 8748115

Please sign in to comment.