Skip to content

Commit 06cedfd

Browse files
committed
fix build on tag push
1 parent 34840dc commit 06cedfd

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/publish-release.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,15 @@ jobs:
4646
if: '${{ inputs.version }}'
4747
shell: pwsh
4848
run: 'Write-Output "version_full=${{ inputs.version }}" >> $env:GITHUB_ENV'
49+
- name: 'Fix full version format'
50+
shell: pwsh
51+
run: |
52+
$ver = '${{ env.version_full }}'.TrimStart('v')
53+
Write-Output "version_full=$ver" >> $env:GITHUB_ENV
4954
- name: 'Generate short version'
5055
shell: pwsh
5156
run: |
52-
$ver = [SemVer]('${{ env.version_full }}'.TrimStart('v'))
57+
$ver = [SemVer]'${{ env.version_full }}'
5358
$short_ver = "$($ver.Major).$($ver.Minor).$($ver.Patch)"
5459
Write-Host "Got $short_ver from ${{ env.version_full }}"
5560
Write-Output "version_short=$short_ver" >> $env:GITHUB_ENV
@@ -109,7 +114,7 @@ jobs:
109114
uses: ncipollo/release-action@v1
110115
with:
111116
commit: '${{ github.sha }}'
112-
tag: '${{ env.version_full }}'
117+
tag: 'v${{ env.version_full }}'
113118
draft: true
114119
prerelease: true
115120
allowUpdates: true

0 commit comments

Comments
 (0)