Skip to content

Commit

Permalink
Fix tag name and sha path in release workflow (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanlabelle authored Jul 23, 2024
1 parent a038bfc commit 3bb20d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
id: version
shell: pwsh
run: |
$TagName = "${{ github.event.push.tag_name }}"
$TagName = "${{ github.ref_name }}"
if ($TagName.StartsWith("v")) { $SemVer = $TagName.Substring(1) }
else {
$CommitHash = "${{ github.sha }}".Substring(0, 7)
Expand All @@ -47,7 +47,7 @@ jobs:
-NativeExe "build\release\Sources\SwiftWinRT\SwiftWinRT.exe" `
-Version "${{ steps.version.outputs.semver }}" `
-OutputPath $OutputPath
(Get-FileHash $OutputPath).Hash | Out-File -FilePath $OutputPath.sha256
(Get-FileHash $OutputPath).Hash | Out-File -FilePath "$OutputPath.sha256"
- name: Create GitHub Release
if: github.event_name == 'push'
Expand All @@ -56,7 +56,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Create Release
$TagName = "${{ github.event.push.tag_name }}"
$TagName = "${{ github.ref_name }}"
$SemVer = "${{ steps.version.outputs.semver }}"
$RepositoryUrl = "${{ github.repository }}"
$PrereleaseArg = if ($SemVer.StartsWith("0.") -or $SemVer.Contains("-")) { @("--prerelease") } else { @() }
Expand Down

0 comments on commit 3bb20d2

Please sign in to comment.