Skip to content

Commit 92c7639

Browse files
chore: checkout repo before git describe (#1037)
1 parent 30bb533 commit 92c7639

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,19 @@ jobs:
3838
version: ${{ steps.create-release-branch.outputs.version }}
3939
branch: ${{ steps.create-release-branch.outputs.branch }}
4040
steps:
41+
- name: Checkout this repository
42+
uses: actions/checkout@v4
43+
with:
44+
ref: ${{ inputs.branch || 'main' }}
45+
fetch-tags: true
46+
path: version-checkout
47+
4148
- id: version
4249
run: |
4350
if [[ -n "${{ inputs.version }}" ]]; then
4451
echo "version=${{ inputs.version }}" >> "$GITHUB_OUTPUT"
4552
else
53+
cd version-checkout
4654
tag=$(git describe --tags --abbrev=0)
4755
tweak=$(git describe --tags --abbrev=1 | cut -d'-' -f2)
4856
echo "version=$tag.$tweak" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)